The backend is built with node js and the frontend React. The number of images is not very low not very high.
Should I store the images in the database (MongoDB)? , on the cloud like Amazon?, or in the server?
Note: one of the functionalities on the website is : the admin can add a product with the image from his desktop , and this product with the uploaded image should appear on the products page
please explain which is the best choice with the code, Thank you.
i don’t try any thing yet.
2
Answers
The usual method is to upload them to a bucket, for instance by using AWS’ S3.
You should not use your server nor your database for this. It would be too heavy for your database, and allowing users to upload files to your server is a risky path.
Initial approach:
Some important points to consider:
More advanced second approach: