DEV Community


Posted on

MongoDB Pictures

How do you use pictures that are in MongoDB? I’m using a CMS “Strapi” and there’s pictures that are being uploaded, but I don’t know how to access them. I have collections “fish” and “coral”, but Strapi created a collection “upload_image” but, how do I access the pictures in MongoDB, to loop through?

Top comments (1)

leandroandrade profile image
Leandro Andrade

In this case, I suggest to use a storage service like Amazon S3 to save your files and get the absolute path returned by S3 and then save them in your MongoDB.

Avoid to save binary files into database.