This package lets you use Cloudinary with autoform/simpleschema to easily upload an image to your Cloudinary account, and it automatically saves the url for the image using autoform.
meteor add cosio55:autoform-cloudinary
Set up settings.json file
{
"public": {
"CLOUDINARY_API_KEY": "[YOUR API KEY]",
"CLOUDINARY_CLOUD_NAME": "[YOUR CLOUD NAME]"
},
"CLOUDINARY_API_SECRET": "[YOUR API SECRET]"
}
Images = new Mongo.Collection('images');
Images.attachSchema(new SimpleSchema({
image: {
type: String,
autoform: {
afFieldInput: {
type: 'cloudinary'
}
}
}
}));
<template name="imageForm">
{{> quickForm collection="Images" type="insert" id="add-image"}}
</template>
meteor --settings settings.json