PrimeAcademy / shawl-syllabus

1 stars 2 forks source link

Image Upload Direction: Database or FileSystem? #9

Closed victoriamertens closed 1 year ago

victoriamertens commented 1 year ago

Description

Victoria Mertens

This ticket isn't a bug, but more of a question on what direction I should go in. I am working on putting an image upload process into my application. Initially I was looking at Multer, but noticed that Multer saved my files onto the server instead of in the database. I looked around at my other options and realized that this is a highly debated topic with pros and cons for both filesystem and storing images in a DB as some sort of binary/ base64 string. I am a bit torn on the choice because I do not want to significantly decrease my DB storage, but also don't want images to be slow.

I was hoping to get your thoughts on it. I am leaning towards just using Multer for ease on both the user and me (except for in the file deletion process), and to save my DB the extra weight. Do you know any alternatives that might be better?

DoctorHowser commented 1 year ago

Gave direction about using AWS S3, and sent her our example repo