While I had to develop a music site that allowed you to upload audio files to the site and then converted to various formats using ffmpeg, people then downloaded the downloaded audio files after they were purchased, and the tmp file was created and placed at the download location and is valid only for everyone download instance, after which the tmp file will be deleted.
Now I am revising the project, I have to add pictures and videos as downloadable content.
I want to find the best way to store files,
option 1: save files in a folder and their link in the database
option 2: save the actual file in the database (mysql) as a blob.
I reflect on this idea to consider the safety implications of each method and other issues that I might not have calculated.
source share