Page 1 of 1
user management for file upload
Posted: Sat Feb 19, 2005 6:49 am
by jimmah
Hi guys,
I've got a file upload script working on my server. What i really want to do with it is, have it so only authorised users can access it, and also each user should upload to a separate directory. Any ideas?
Thanks
Jim
Posted: Sat Feb 19, 2005 6:56 am
by n00b Saibot
use sessions w/ db to store authorize users names and upload dir info and script utilizing this info.
Posted: Sat Feb 19, 2005 8:36 pm
by Trenchant
I would just update the file upload class so that first of all only registered users can upload images. Then save the image names as (userid)_(users specific image ID).gif or whatever ending like that.
Then just keep image information in a database so you match image id with image infor and userid with user info. You could also get away with just making an image id and not including the user id.
Posted: Sat Feb 19, 2005 9:59 pm
by timvw
it isn't hard to create directories.. it isn't hard to make sure those names allow you to identify the user... usually this is done by naming the directories the same as the user... just read the fine php manual on filesystem operations....
Posted: Sun Feb 20, 2005 9:04 am
by jimmah
cheers guys,
will give your suggestions a go.
jim