title: Where to store uploaded files (sound, pictures and video)
body: <p>A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would be created and placed at the download location and was only valid for each download instance and the tmp file would then get deleted.</p>
  
  <p>Now I am revisiting the project, I have to add pictures and video as upload content also. </p>
  
  <p>I want to find the best method for storing the files,</p>
  
  <p>option 1 : storing the files in a folder and reference them in the database </p>
  
  <p>option 2 : storing the actual file in the database(mysql) as blob.</p>
  
  <p>I am toying around with this idea to consider the security implications of each method, and other issues I might have not calculated for.  </p>