fs.writeFile('./tmp/picture.jpg',imageBuff,function(err){
if(err)
{
console.log('Error Found',err);
}
else
{
var fileName= process.env.GLOBAL_PATH+'/tmp/picture.jpg';
console.log('this is fileName', fileName);
cloudinary.uploader.upload(fileName, function(response)
{
var picture=new Pic();
picture.name= req.body.name;
picture.description=req.body.description;
picture.url=response.secure_url;
console.log('Image secure_url is' + response.secure_url);
picture.save();
res.status(200).end();
console.log('This the response '+ res);
});
}
})
This is the code where i’m having a problem
Reading and writing files locally on device requires the use of the Cordova File Plugin https://ionicframework.com/docs/native/file/
installed plugins but nothing comes off
What exactly are you trying to do?
What error are you getting?
What is happening although it should not?
Or what is not happening although it should?
I’m trying to capture the image and send it to cloudinary
The url of cloudinary repository should be saved in picture.url but I’m unable to get the url
the url is undefined which shouldn’t happen
The picture should go to cloudinary which is not happening
asadarshadar:
cloudinary.uploader
Ok, what is this cloudinary.uploader
you are using? (link)
yeah this is what I’m using
No I’m asking you what library you are using.
sorry i just can’t understand what kind of library you are asking if you provide some hint so that i can easily tell. Please
or are talking about plugin
then i’m using cordova-camera plugin
u there? cloudinary not working if there’s any suggestion?
Ok, what is this cloudinary.uploader you are using? (link)
I don’t know what “cloudinary.uploader” is. Provide a link to where I can read documentation of something about it.
Wait, the code in your first post is not from Ionic but from a Node.js application!?