So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.
My question is this: Should there be a different table for each "type" of file? Also, should the files be stored in context-related locations on the server, or all together?
Some examples: user profile photos, job application CVs, related documents on CMS pages, etc.