I'm struggling with the process of uploading images to Cloudinary and then inserting the image URLs into my database. I'm starting from scratch here, and the Cloudinary documentation hasn't been that helpful for me. I'm planning to get the images from an input type file. Can anyone share some advice or steps to help me get started? Thanks!
3 Answers
If you're looking to upload images to Cloudinary, it really depends on how you're getting those images. If you have the files saved in a specific folder, you can directly reference them using their URL and use the Cloudinary SDK to handle the upload. But if you're working from a front end like a web form, you'll probably need to convert the image into base64 format before uploading it to Cloudinary along with the necessary metadata. It sounds a bit complex, but it's doable!
Hey, I'm the founder of an alternative to Cloudinary called Re-Image. If you're interested in switching it up, I can personally guide you through the setup process. It's simpler than Cloudinary, and we offer a free tier to get you started!
Thanks for the offer! But I did manage to figure out how to do it with Cloudinary.
If you're using Express with your Cloudinary setup, you'll need to incorporate a middleware to handle file uploads. But good news! I actually just figured it out myself and it was easier than I expected!
That's awesome! Glad to hear it works for you now!
Why would you need to convert it to base64 for uploading? Seems like an extra step to me.