tags:

views:

78

answers:

1

What is the best method to follow for uploading files to server using my website ? Each user will upload some files to his profile.Should i place all files in a single directory or do i need to create folders for each user and keep the files there? How you tube is doing this ? Any idea ? How should i store the uploaded info in database.Whats the best efficied approcach to do this when handling large number of users and files . I dont want to know about the usage of API and all.I want to know the best approach (file organization)

Thanks in advance

+1  A: 

I would have a folder for each user, its more managable!

I wouldn't fancy a massive folder with loads of files!

You could end up with duplicate file names and end up deleting another users files!

I would create a directory for every user!

Rigobert Song
What should be the ideal way to name the folder.Id or User's Name ?
Shyju
You should also group the users into subfolders - when you get 100,000+ users you'll be glad you did
Greg
Group on what basis ?I have only one type of users
Shyju
First few characters of username/ID is one possibility.
outis
you could group them by date, alphabetically (first letter of username)! if you end up with lots of users it will save you hassle down the line
Rigobert Song