What is the most correct way to store files [duplicate]

2

I always stumble upon this doubt when I have to work with file storage within software.

  • Is it ideal that I simply burn them to a folder and save the information in the database, with a field pointing to the path where the file is located?
  • Or is it more feasible for me to create a "file" field and convert the bytes of this file, thus centralizing all my storage in the database?

In my case it is more specifically '.mp3' and '.mp4' files that are sent to the user via streaming.

As the files can become very large, I think this can be a problem when storing directly in the bank and so the first option becomes more viable, but in other cases, there is some case that I should / can store in the bank?

The question # covers the subject well, but I still have not been very clear about the size of the files, and if they are of any way can affect my bank's performance

    
asked by anonymous 17.08.2017 / 15:26

0 answers