Skip to content

Instantly share code, notes, and snippets.

@NickyYo
Last active December 2, 2017 14:51
Cloudinary upload with 'express' & 'express-fileupload'
import cloudinary from 'cloudinary';
cloudinary.config({
api_key: '',
api_secret: '',
cloud_name: ''
});
export function sendMail(req, res) {
cloudinary.v2.uploader.upload_stream({ tags: "snap_qoute_me" }, function(error, result) {
res.send(200, result.secure_url);
res.end();
}).end(req.files.image_1.data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment