Cloudinary helps developers across the world manage images with minimal efforts. In this tutorial, we will be looking at how to upload images from ...
For further actions, you may consider blocking this person and/or reporting abuse
Hi... what if i want to have this part of the code in a separate file
// upload image here
cloudinary.uploader.upload(data.image)
.then((result) => {
response.status(200).send({
message: "success",
result,
});
}).catch((error) => {
response.status(500).send({
message: "failure",
error,
});
});
Hey Becky, that is absolutely fine and well recommended especially for big projects.
I did just that in this article
I hope you find the answer there. If you have more questions, I am still available ๐
this is my image
error:
(node:2016) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
Hey Dimer, you are sending in an object containing the file details instead of just sending in the path to the image in you local machine.
Check out this dev.to/ebereplenty/cloudinary-and-....
The path is supposed to read: "c:/nam/folder/.../file_name.extension" and cloudinary will take it from there
Please is there a way I can upload a blob, please help me
Hey Chimaobi,
Sorry for the late reply
I think you are referring to the frontend of the application. Right?
I was able to do it on the frontend of the application
I was just asking it were possible for me to do it on the server (nodejs)
That's alright.
It may be possible but I haven't given it a try before
Okay...
Thanks for time and consign.
How to set a particular width and height for the image or reduce image size while uploading? Can you please help me out!
I haven't done that before. I think it is doable when delivering the image to a user on the FE. Check this out: cloudinary.com/documentation/image...
Hi ,
i am facing issue with when parsing data
Thank you Samson, your article helped a lot. Waiting for this "Persisting and Retrieving images using cloudinary and Postgresql Through Nodejs".
Hey Thomas, the article is here. I had you in mind when preparing it. Check it out here
Thank you so much Ebere. I'll look at right away.
I will definitely work on that especially because you ask. Thank you for reading!
Thanks a million. I was totally stuck. Very clear, step by step explanations
You are welcome. Comments like this makes me write more. Thanks for reading
In addition to using environment variables I can recommend the tool github.com/dotenv-linter/dotenv-li... - itโs a lightning-fast linter forย .env files. Written in Rust.
Thank you for that suggestion. I will check it out.
thanks for the great tutorial! i have a question, how to manage the image on cloudinary after success uploading the file? i'm confused with usecase in frontend-side