WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] Feature request: Multiple file select in Upload photos (11 posts)

  1. Augustin_Zidek
    Member
    Posted 2 years ago #

    When selecting photos for upload one can select only one photo at once. However, it is possible to upload multiple photos using this method but each file has to be added separately. (There is also the upload zipped photos option but it is not very user-friendly.)

    Would it be possible to use <input type=file multiple=true> instead of <input type=file multiple=false>?

    More info:
    http://www.w3schools.com/html5/att_input_multiple.asp
    http://www.w3.org/TR/html-markup/input.file.html

    Thanks a lot in advance!

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Will be investigated.

  3. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    A normal (pre-html5) single file upload returns to the server the PHP variable $_FILES with (e.g.):

    Array
    (
        [name] => Afb025 (1).JPG
        [type] => image/jpeg
        [tmp_name] => /mnt/shared/tmp/phpjvaWyf
        [error] => 0
        [size] => 413654
    )

    One would expect that when you add multiple="multiple" to the input tag, this would result in something like:

    Array (
    [0] => Array
    (
        [name] => Afb025 (1).JPG
        [type] => image/jpeg
        [tmp_name] => /mnt/shared/tmp/phpjvaWyf
        [error] => 0
        [size] => 413654
    )
    [1] => Array
    (
        [name] => Afb026 (1).JPG
        [type] => image/jpeg
        [tmp_name] => /mnt/shared/tmp/ph...
        [error] => 0
        [size] => 413654
    )
    )

    But only the last file is returned in the $_FILES var.

    Does anybody know where to find the the uploaded files on the server?

  4. Augustin_Zidek
    Member
    Posted 2 years ago #

    Hi. I did some research on this topic and I have found this, maybe it can help:
    http://rakaz.nl/2009/08/uploading-multiple-files-using-html5.html

    Note: You probably noticed the brackets I used in the name of the input element. This is not a requirement of the HTML5 specification in any way, but it is a requirement of the PHP scripting language I use on the server. If you add the brackets to the name PHP will construct an array of the uploaded files on the server. If you would leave off the brackets it would process the files in order and only provide the last file to your script. For more information about processing multiple uploaded files see the PHP manual.

    And the php article concerning this topic:

    http://www.php.net/manual/en/features.file-upload.multiple.php

  5. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Thanx a lot, this will help me further (next week).

  6. Augustin_Zidek
    Member
    Posted 2 years ago #

    Thank you. Should I expect a new version adding this feature next week? :)

  7. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, during next week. Got it working already at the front end upload. It turns out to be as simple as one plus one afterall...

  8. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Fixed 4.4.8 available

  9. Augustin_Zidek
    Member
    Posted 2 years ago #

    Hi Opajaap,

    sorry for not responding for such a long time. I would like to thank you this feature and your immediate reaction!

    There is one thing I would still like to suggest: When uploading single photos, once you select a photo it is added into a list under the file-input box. Would this be possible also with the multiple file upload? So that once you select multiple photos the list of them would be added under the multiple-file-input box.

  10. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Would this be possible also with the multiple file upload?

    Yes! It will be there in the next version (4.5.1) available in a few days.
    Thanx for the idea.

  11. Augustin_Zidek
    Member
    Posted 2 years ago #

    I updated to version 4.5.1 today, and the upload works just great! Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic