How Do I Upload Images to Cloudinary and Save the URL in My Database?
Asked by
SunnyWalker42
I've been struggling to upload images to Cloudinary and then insert the image URLs into my database. I'm not sure where to begin, and honestly, the documentation isn't very helpful. I typically get the images from an input type file. Any advice on how to kickstart this process would be appreciated! Thanks!
Answers
If you're looking to upload directly from a local file, you can reference the file URL if it's in a specific folder and use the Cloudinary SDK to upload it. If you're doing it from the frontend, you'll likely need to convert it to Base64 before uploading. It might sound complicated, but thatโs usually how it works! Let me know if you need more details on this.
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCoder88: Wait, creating a Base64 version is necessary? Can you explain why thatโs the route to take?