Reputation: 16590
I'm going to make a files, resources manager for user. My website provide a service help user create blog, website and allow user upload their resources. I'm will create a folder structure like below. Any suggestion?
usercontents
--user1
----folder1
----folder2
--user2
--user3
----my images
Should I use database to index those files?
Upvotes: 0
Views: 427
Reputation: 1931
If I'd do something like this, firstly I would do the following:
my awesome mp3 file (some comment here).mp3
turns into my-awesome-mp3-file-some-comment-here.mp3
;screenshot.png
into screenshot-2.png
);Further optimization:
I wrote a community driven file sharing website and I think it shows. :)
Upvotes: 1
Reputation: 39389
It would make sense to use a database, as then only files added through your interface would only be available to view then (presuming you're reading the file list from a database and not the actual file system).
Upvotes: 1