Results 1 to 5 of 5

Thread: Storing Photos

  1. #1

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    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

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.

  3. #3

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    Re: Storing Photos

    Quote Originally Posted by kows View Post
    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?

  4. #4
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.

  5. #5

    Thread Starter
    Fanatic Member bharanidharanit's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    673

    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
  •  



Click Here to Expand Forum to Full Width