So I am building an application that will allow a user to make a listing (think something like eBay) and have them add ~8 photos to the listing. I have found tutorials on youtube for uploading pictures using multer which I have implemented, but it's just being stored in an uploads folder in the project directory.
What is the best way to truly store this data in a scaleable way, so the correct photos will be shown for every listing? How do I get these images stored in the DB Listing model, or I guess in an Image model that will be associated with the Listing model… As you can tell, I'm newer so don't know the best way to go about this. I saw something about using knex? but I couldn't find enough to get me going.
There must be some type of library that could make it so multer is sending the image to the DB instead of the local folder, OR maybe send it to the local folder, send it to the DB, and then delete the file in the local folder. All of the videos are showing projects that just use the local folder to then access the path, but I can't see this working for a lot of listings right?
submitted by /u/billyg0at420
[link] [comments]
from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/32WINPL