I need advice about files and categories in asp.net
I am working on a pro开发者_运维技巧ject for files upload and storage. One of the tasks is to be able to select in which category you want to upload the documents, for example: "work", "private", etc. As it is now, I have folders for each user, and each user has one folder for all the documents. I was thinking to create a sql table and have the categories there, but any idea how to reference them. If anyone else have some better idea, it would be appreciated. Thanks
You can have a table to define categories. Then you need a table to store metadata and path of the uploaded documents. When user uploads a document he/she will select the category in which to upload it and you can store the path of document, category, size, type, user id etc. in the second table. This way it will be easier to query for the statistics like number of files in each category, total size of files per user or per category.
精彩评论