How Do I Upload Images to Cloudinary and Save the URL in My Database?

0
3
Asked By SunnyWalker42 On

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!

1 Answer

Answered By ImageWiz99 On

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.

CuriousCoder88 -

Wait, creating a Base64 version is necessary? Can you explain why that’s the route to take?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.