Uploaded File Storage Options/Comparisons
Posted on 2006-07-19
Hello all. I haven't been around EE for a while, but was active a few years ago. Anyway, I've done some searching on the following and I felt it would be good to have one discussion that covered the pros and cons of different approaches for storage of files uploaded to a web server. So, here's the situation...
1. All users who upload/view files are registered.
2. Users can upload files which can be accessed by themselves and other registered members (no public access to the files).
3. Directory level security is not possible, ie, restrict access to a directory by user account
Question: What is the best approach for storing the files? The two that I understand are (1) store the files in a directory or (2) store the files in a database in binary format.
What are the pros and cons (good points and bad points) of each approach? What is most widely used?
Thanks in advance. Ultimately, I'll be implementing this in ASP.NET 2.0, but I believe the audience to discuss this is much wider than that subset of developers/experts.
Thanks. I'm looking forward to helpful comments/answers.