I'll throw in my two-cents. Dealt with this issue before
Consider the following:
- For how long do you need to store these files?
- how much traffic your web application will have which will use the feature to store files (seeing it's e-commerce, it would likely be a lot of people)
- File size limitations
- Additional code to write to possible 1) scan the files for malignency (such as malware), 2) encrypting the files, 3) compressing the files and 4) streaming methods to store these files to a cloud-based storage instance or file system
-
File Systems have a disadvantage considering the following:
> Costs involved storing it on File System (which basically acts as a non-sql solution)
> Amount of reads/writes to these files
> Proper handling of file accessibility
> Proper handling of file in-use state (making sure that the system you are using won't have the documents open while you attempt to write to it again)
> Proper handling of file uniqueness (sometimes, just having the file name won't be good enough - how will you determine whether two files of the same name won't overwrite each other? what if two files have the exact same content but different file names?)
> Impact on disk for storing files of different sizes and how you would access the files (for instance, searching for exact file
names or looping through batches of files - here we go pro. Understand branch predictions and how this could influence the performance of your web application)
> Finally, usage of ILLEGAL names for files / directories should you choose to have your files not uniquely identified by a GUID or similar mechanism (which will require some serious coding to ensure you ALWAYS retrieve the right files) (Illegal names such as CON, PRN or NULL w/o file extensions for example)
For your situation, I would attempt to find hosting for MySQL databases (since you ruled out using MSSQL), or have a cluster of MSSQL Express databases hosted somewhere (since there is a size limitation for these types of databases). After scanning, encrypting and compressing these files, you might want to consider temporarily caching files and write it in batches to your DB (considering the size of your files) to reduce the amount of I/O read/write time and possible network load. You may also want a scanning mechanism to ensure file content uniqueness (answered beautifully by
this post - filtering out exact same files), having a second table containing pointers to these files.
Heed some of the advice on the posts before mine - Amazon and Azure are great platforms to work with. If costs are an issue, you would likely find an alternative to hosting
Here
Hope this advice helps
**Edit**
Never worked with amazon or azure before, don't know costs involved there. Had the luck of working with hosted MSSQL instances most of the time.