var uploadPAN = app.post('/upload', multipartMiddleware, function(req, res) {
cloudinary.v2.uploader.upload(req.files.image.path,
{
ocr: "adv_ocr"
}, function(error, result) {
if( result.info.ocr.adv_ocr.status === "complete" ) {
res.json(result);
var desp=(result.info.ocr.adv_ocr.data[0].textAnnotations[0].description);
}
}
});
So currently this code uploads the image from local.
So my question is:
How to upload with an image url?
Suppose I have the url-> www.xyzasdfghjkl.png
, then what would be the path and image in req.files.image.path