This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // handlebars helper to make the cloudinary_uploader_image_upload_tag work in my hbs template | |
| // fieldname: the value to use for data-cloudinary-field | |
| // resourceType: "raw" for raw files, "image" for images | |
| // cloudinaryTagName: "cloudinary-fileupload" for images, "cloudinary-fileupload-file" for raw files | |
| // tag: custom tag for uploaded files | |
| hbs.registerHelper("cloudinary_uploader_image_upload_tag", function(fieldname, resourceType, cloudinaryTagName, tag){ | |
| return new hbs.SafeString(cloudinary.uploader.image_upload_tag(fieldname, { | |
| callback: cloudinary_cors, |