|
-
Jan 21st, 2010, 12:37 PM
#1
Thread Starter
Fanatic Member
Storing Photos
Hi,
I am developing application like Social Networking. I want the users to store their avatar and photos. I would like to store their photos only in filesystem. When the user logins, the user corresponding avatar and their albums must be displayed. Any ideas?
Thankyou
-
Jan 21st, 2010, 03:22 PM
#2
Re: Storing Photos
handling file uploads. change the filename after uploading (when you're storing it, using move_uploaded_file()) to the user's ID, or something else unique to that user.
-
Jan 25th, 2010, 04:36 AM
#3
Thread Starter
Fanatic Member
Re: Storing Photos
 Originally Posted by kows
handling file uploads. change the filename after uploading (when you're storing it, using move_uploaded_file()) to the user's ID, or something else unique to that user.
I want to create a seperate folder inside the root directory for each users after registering to store their avatar and photos. suppose if the username is user1, i want to create a folder inside the root called user1 and inside that folder, again 2 folders named avatar and photos to store user avatar and photos respectively. Is this the good one?
-
Jan 25th, 2010, 10:30 AM
#4
Re: Storing Photos
well, you don't have to make a bunch of directories; you could just prefix photos with a string illustrating what it was: user1_photo_[name].jpg, for example. you could use directories if you want, though, it doesn't really matter I guess. you'll have to use mkdir() to make the user's directory, and then make the two sub-directories after that. this would all be done during registration.
-
Jan 26th, 2010, 09:10 AM
#5
Thread Starter
Fanatic Member
Re: Storing Photos
Yes sir thankyou. I wil try this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|