Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

uploading a folder of images

  • 20-10-2006 01:45PM
    #1
    Registered Users, Registered Users 2 Posts: 252 ✭✭


    Hi
    im developing a community site with php + mysql

    i want to give the user the option of uploading alot of images at once.

    id like to have it so as they specify a folder and it runs throught the images and uploads...

    the part im stuck on is how does the user specify the folder ??
    (as <input type=file> only allows u to select a file)

    Thanks
    Sean


Comments

  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    It can't really be done.

    Your best bet is to support .zip file uploads, then you unzip the file when it's uploaded, and place each separate file into the database.


  • Registered Users, Registered Users 2 Posts: 252 ✭✭ConsultClifford


    seamus wrote:
    It can't really be done.

    Your best bet is to support .zip file uploads, then you unzip the file when it's uploaded, and place each separate file into the database.


    Thanks seamus.. i may have to go that route

    however is there any way of telling where an uploaded image comes from - that way i can run through all teh files in the source folder.... just a thought...


  • Closed Accounts Posts: 902 ✭✭✭BreadBoard


    Could the users upload the files via a secure FTP to the folder in some way ?

    Just a guess...


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    It can't be done with pure PHP, but you could use a Flash\Java-based uploader.


  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    or you could do a dynamic form builder that keeps adding file upload(s) to the form as the user elects to upload

    example: http://www.faqts.com/knowledge_base/view.phtml/aid/1785/fid/129
    http://www.madirish.net/tech.php?section=1&article=141


    and then have php explode the array that is submitted and upload like that

    http://us3.php.net/features.file-upload


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    Would it be possible, to use the file select dialog box to select multiple files, load these files into a hidden SELECT box, then use javascript to dynamically add file upload fields for each item in the select box?

    Would be quite cool if it worked...


Advertisement