SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Los Angeles
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Upload directories/lots of files at a time?

    Hello all,

    I want to add a photo gallery feature on my site. But if a user wants to add, say, 50 photos to one album, I wouldn't want him/her to upload one at a time, or even select each photo individually (e.g. with 50 input fields). Is there a way to have the user select a directory at a time, and PHP could comb through it and select every jpg file and upload it? Or select a bunch of files at a time through one file browser window? Thanks!

    -Sam

  2. #2
    SitePoint Guru gavwvin's Avatar
    Join Date
    Nov 2004
    Location
    Cornwall, UK
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, because that would be a security risk- the server doesn't know anything about and can't do anything with a clients filesystem (except cookies).
    I have had a similar problem, where the owner of a site wanted to add 200 images at a time from the one directory- we finally decided to install Apache on her computer, and I wrote a script that used php's ftp functions to upload the images (this can be done because the script is running on the clients machine, acting as a second server), however it sounds like that's not possible in your case if you have lots of users, so it looks like your stuck with doing one at a time.

  3. #3
    SitePoint Enthusiast cilverphox's Avatar
    Join Date
    Jan 2005
    Location
    Petoskey, MI
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice explanation. it saves me from asking the same question..

  4. #4
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not just use a java upload applet?

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Los Angeles
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I found this... http://www.radinks.com/upload/plus/file.php . Anyone know of free/open source alternatives that have similar/identical features? Though $50 isn't too bad for unlimited use...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •