Allowing Client to Upload Multiple Files

Discussion in 'HTML' started by Peter Lauren, May 3, 2011.

  1. Peter Lauren

    Peter Lauren Guest

    I am building a web site and my server PCs are running Windows XP. I
    would like the client to be able to upload multiple files. I have
    considered the following.

    1/ The following code from http://www.w3schools.com/TAGS/tag_select.asp.

    <form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <label for="file">Filename:</label>
    <input type="file" name="file" id="file" />
    <br />
    <input type="submit" name="submit" value="Submit" />
    </form>

    The user would only be able to use one file at a time.

    2/ A modification of 1 where the user uploads a zip file, containing
    all the files to upload. The approach then would be to unzip the
    files server-side. One approach suggest for this was PHP Zip
    http://www.w3schools.com/php/php_ref_zip.asp . This link says to
    download and install zziplib. I have never had any luck with zlib but
    I thought I would try this. Bunch of error messages. Had to change
    the .c suffices to .cpp and also find and download a bunch of .h
    files. Even then I got a bunch of error messages when I tried to
    compile.

    3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    Should that work?

    4/ Using ftp. Should that work? How would I implement it?

    5/ Using Flash or Starlight. Are these free? Can they be used
    server-
    side?

    Many thanks in advance for any feedback,
    Peter.
     
    Peter Lauren, May 3, 2011
    #1
    1. Advertising

  2. Peter Lauren

    Erwin Moller Guest

    On 5/3/2011 9:42 PM, Peter Lauren wrote:
    > I am building a web site and my server PCs are running Windows XP. I
    > would like the client to be able to upload multiple files. I have
    > considered the following.
    >
    > 1/ The following code from http://www.w3schools.com/TAGS/tag_select.asp.
    >
    > <form action="upload_file.php" method="post"
    > enctype="multipart/form-data">
    > <label for="file">Filename:</label>
    > <input type="file" name="file" id="file" />
    > <br />
    > <input type="submit" name="submit" value="Submit" />
    > </form>
    >
    > The user would only be able to use one file at a time.
    >
    > 2/ A modification of 1 where the user uploads a zip file, containing
    > all the files to upload. The approach then would be to unzip the
    > files server-side. One approach suggest for this was PHP Zip
    > http://www.w3schools.com/php/php_ref_zip.asp . This link says to
    > download and install zziplib. I have never had any luck with zlib but
    > I thought I would try this. Bunch of error messages. Had to change
    > the .c suffices to .cpp and also find and download a bunch of .h
    > files. Even then I got a bunch of error messages when I tried to
    > compile.
    >
    > 3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    > Should that work?
    >
    > 4/ Using ftp. Should that work? How would I implement it?
    >
    > 5/ Using Flash or Starlight. Are these free? Can they be used
    > server-
    > side?


    6/ Create multiple file elements in your form. Check serverside which
    ones were used (via $_FILES).
    Read more here:
    http://nl.php.net/manual/en/features.file-upload.multiple.php

    That way you can offer more files.

    Regards,
    Erwin Moller

    >
    > Many thanks in advance for any feedback,
    > Peter.



    --
    "That which can be asserted without evidence, can be dismissed without
    evidence."
    -- Christopher Hitchens
     
    Erwin Moller, May 4, 2011
    #2
    1. Advertising

  3. Jukka K. Korpela, May 5, 2011
    #3
  4. Peter Lauren

    Peter Lauren Guest

    On May 4, 4:38 am, Erwin Moller
    <> wrote:
    > On 5/3/2011 9:42 PM, Peter Lauren wrote:
    >
    >
    >
    > > I am building a web site and my server PCs are running Windows XP.  I
    > > would like the client to be able to upload multiple files.  I have
    > > considered the following.

    >
    > > 1/ The following code fromhttp://www.w3schools.com/TAGS/tag_select.asp.

    >
    > > <form action="upload_file.php" method="post"
    > > enctype="multipart/form-data">
    > > <label for="file">Filename:</label>
    > > <input type="file" name="file" id="file" />
    > > <br />
    > > <input type="submit" name="submit" value="Submit" />
    > > </form>

    >
    > > The user would only be able to use one file at a time.

    >
    > > 2/ A modification of 1 where the user uploads a zip file, containing
    > > all the files to upload.  The approach then would be to unzip the
    > > files server-side.  One approach suggest for this was PHP Zip
    > >http://www.w3schools.com/php/php_ref_zip.asp.  This link says to
    > > download and install zziplib.  I have never had any luck with zlib but
    > > I thought I would try this.  Bunch of error messages.  Had to change
    > > the .c suffices to .cpp and also find and download a bunch of .h
    > > files.  Even then I got a bunch of error messages when I tried to
    > > compile.

    >
    > > 3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    > > Should that work?

    >
    > > 4/ Using ftp.  Should that work?  How would I implement it?

    >
    > > 5/ Using Flash or Starlight.  Are these free?  Can they be used
    > > server-
    > > side?

    >
    > 6/ Create multiple file elements in your form. Check serverside which
    > ones were used (via $_FILES).
    > Read more here:http://nl.php.net/manual/en/features.file-upload.multiple.php
    >
    > That way you can offer more files.
    >
    > Regards,
    > Erwin Moller
    >
    >
    >
    > > Many thanks in advance for any feedback,
    > > Peter.

    >
    > --
    > "That which can be asserted without evidence, can be dismissed without
    > evidence."
    > -- Christopher Hitchens


    Hi Erwin,

    Thank you so much for your reply. I tried all of the examples at that
    link. My main problem is that the number of file elements is a
    variable and typically on the order of 40-60 although it can be any
    number. Hard coding a fixed number of elements would not work. Is
    there a way to make the number of file elements a variable?

    Thanks again,
    Peter.
     
    Peter Lauren, May 6, 2011
    #4
  5. Peter Lauren

    Peter Lauren Guest

    On May 4, 4:38 am, Erwin Moller
    <> wrote:
    > On 5/3/2011 9:42 PM, Peter Lauren wrote:
    >
    >
    >
    > > I am building a web site and my server PCs are running Windows XP.  I
    > > would like the client to be able to upload multiple files.  I have
    > > considered the following.

    >
    > > 1/ The following code fromhttp://www.w3schools.com/TAGS/tag_select.asp.

    >
    > > <form action="upload_file.php" method="post"
    > > enctype="multipart/form-data">
    > > <label for="file">Filename:</label>
    > > <input type="file" name="file" id="file" />
    > > <br />
    > > <input type="submit" name="submit" value="Submit" />
    > > </form>

    >
    > > The user would only be able to use one file at a time.

    >
    > > 2/ A modification of 1 where the user uploads a zip file, containing
    > > all the files to upload.  The approach then would be to unzip the
    > > files server-side.  One approach suggest for this was PHP Zip
    > >http://www.w3schools.com/php/php_ref_zip.asp.  This link says to
    > > download and install zziplib.  I have never had any luck with zlib but
    > > I thought I would try this.  Bunch of error messages.  Had to change
    > > the .c suffices to .cpp and also find and download a bunch of .h
    > > files.  Even then I got a bunch of error messages when I tried to
    > > compile.

    >
    > > 3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    > > Should that work?

    >
    > > 4/ Using ftp.  Should that work?  How would I implement it?

    >
    > > 5/ Using Flash or Starlight.  Are these free?  Can they be used
    > > server-
    > > side?

    >
    > 6/ Create multiple file elements in your form. Check serverside which
    > ones were used (via $_FILES).
    > Read more here:http://nl.php.net/manual/en/features.file-upload.multiple.php
    >
    > That way you can offer more files.
    >
    > Regards,
    > Erwin Moller
    >
    >
    >
    > > Many thanks in advance for any feedback,
    > > Peter.

    >
    > --
    > "That which can be asserted without evidence, can be dismissed without
    > evidence."
    > -- Christopher Hitchens


    Hi Erwin,

    Thank you so much for your reply. I tried all of the examples at that
    link. My main problem is that the number of file elements is a
    variable and typically on the order of 40-60 although it can be any
    number. Hard coding a fixed number of elements would not work. Is
    there a way to make the number of file elements a variable?

    Thanks again,
    Peter.
     
    Peter Lauren, May 6, 2011
    #5
  6. Peter Lauren

    Peter Lauren Guest

    On May 4, 4:38 am, Erwin Moller
    <> wrote:
    > On 5/3/2011 9:42 PM, Peter Lauren wrote:
    >
    >
    >
    > > I am building a web site and my server PCs are running Windows XP.  I
    > > would like the client to be able to upload multiple files.  I have
    > > considered the following.

    >
    > > 1/ The following code fromhttp://www.w3schools.com/TAGS/tag_select.asp.

    >
    > > <form action="upload_file.php" method="post"
    > > enctype="multipart/form-data">
    > > <label for="file">Filename:</label>
    > > <input type="file" name="file" id="file" />
    > > <br />
    > > <input type="submit" name="submit" value="Submit" />
    > > </form>

    >
    > > The user would only be able to use one file at a time.

    >
    > > 2/ A modification of 1 where the user uploads a zip file, containing
    > > all the files to upload.  The approach then would be to unzip the
    > > files server-side.  One approach suggest for this was PHP Zip
    > >http://www.w3schools.com/php/php_ref_zip.asp.  This link says to
    > > download and install zziplib.  I have never had any luck with zlib but
    > > I thought I would try this.  Bunch of error messages.  Had to change
    > > the .c suffices to .cpp and also find and download a bunch of .h
    > > files.  Even then I got a bunch of error messages when I tried to
    > > compile.

    >
    > > 3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    > > Should that work?

    >
    > > 4/ Using ftp.  Should that work?  How would I implement it?

    >
    > > 5/ Using Flash or Starlight.  Are these free?  Can they be used
    > > server-
    > > side?

    >
    > 6/ Create multiple file elements in your form. Check serverside which
    > ones were used (via $_FILES).
    > Read more here:http://nl.php.net/manual/en/features.file-upload.multiple.php
    >
    > That way you can offer more files.
    >
    > Regards,
    > Erwin Moller
    >
    >
    >
    > > Many thanks in advance for any feedback,
    > > Peter.

    >
    > --
    > "That which can be asserted without evidence, can be dismissed without
    > evidence."
    > -- Christopher Hitchens


    Hi Erwin,

    Thank you so much for your reply. I tried all of the examples at that
    link. My main problem is that the number of file elements is a
    variable and typically on the order of 40-60 although it can be any
    number. Hard coding a fixed number of elements would not work. Is
    there a way to make the number of file elements a variable?

    Thanks again,
    Peter.
     
    Peter Lauren, May 6, 2011
    #6
  7. Peter Lauren

    Peter Lauren Guest

    On May 4, 4:38 am, Erwin Moller
    <> wrote:
    > On 5/3/2011 9:42 PM, Peter Lauren wrote:
    >
    >
    >
    > > I am building a web site and my server PCs are running Windows XP.  I
    > > would like the client to be able to upload multiple files.  I have
    > > considered the following.

    >
    > > 1/ The following code fromhttp://www.w3schools.com/TAGS/tag_select.asp.

    >
    > > <form action="upload_file.php" method="post"
    > > enctype="multipart/form-data">
    > > <label for="file">Filename:</label>
    > > <input type="file" name="file" id="file" />
    > > <br />
    > > <input type="submit" name="submit" value="Submit" />
    > > </form>

    >
    > > The user would only be able to use one file at a time.

    >
    > > 2/ A modification of 1 where the user uploads a zip file, containing
    > > all the files to upload.  The approach then would be to unzip the
    > > files server-side.  One approach suggest for this was PHP Zip
    > >http://www.w3schools.com/php/php_ref_zip.asp.  This link says to
    > > download and install zziplib.  I have never had any luck with zlib but
    > > I thought I would try this.  Bunch of error messages.  Had to change
    > > the .c suffices to .cpp and also find and download a bunch of .h
    > > files.  Even then I got a bunch of error messages when I tried to
    > > compile.

    >
    > > 3/ Unzipping the uploaded zip file server-side using pkzip.exe.
    > > Should that work?

    >
    > > 4/ Using ftp.  Should that work?  How would I implement it?

    >
    > > 5/ Using Flash or Starlight.  Are these free?  Can they be used
    > > server-
    > > side?

    >
    > 6/ Create multiple file elements in your form. Check serverside which
    > ones were used (via $_FILES).
    > Read more here:http://nl.php.net/manual/en/features.file-upload.multiple.php
    >
    > That way you can offer more files.
    >
    > Regards,
    > Erwin Moller
    >
    >
    >
    > > Many thanks in advance for any feedback,
    > > Peter.

    >
    > --
    > "That which can be asserted without evidence, can be dismissed without
    > evidence."
    > -- Christopher Hitchens


    Hi Erwin,

    Thank you so much for your reply. I tried all of the examples at that
    link. My main problem is that the number of file elements is a
    variable and typically on the order of 40-60 although it can be any
    number. Hard coding a fixed number of elements would not work. Is
    there a way to make the number of file elements a variable?

    Thanks again,
    Peter.
     
    Peter Lauren, May 6, 2011
    #7
  8. Peter Lauren

    Peter Lauren Guest

    On May 5, 4:36 pm, "Jukka K. Korpela" <> wrote:
    > 3.5.2011 22:42, Peter Lauren wrote:
    >
    > > I am building a web site

    >
    > You multiposted your question. Multiposting is bad. Don't do multipost.
    >
    > (I posted my answer to comp.infosystems.www.authoring.misc.)
    >
    > --
    > Yucca,http://www.cs.tut.fi/~jkorpela/


    I usually don't dignify such remarks with a comment. People cross
    post all the time. If you don't like the way people post then start
    your own moderated ng.
     
    Peter Lauren, May 6, 2011
    #8
  9. 6.5.2011 17:41, Peter Lauren wrote:

    > On May 5, 4:36 pm, "Jukka K. Korpela"<> wrote:
    >> 3.5.2011 22:42, Peter Lauren wrote:
    >>
    >>> I am building a web site

    >>
    >> You multiposted your question. Multiposting is bad. Don't do multipost.
    >>
    >> (I posted my answer to comp.infosystems.www.authoring.misc.)
    >>
    >> --
    >> Yucca,http://www.cs.tut.fi/~jkorpela/

    >
    > I usually don't dignify such remarks with a comment. People cross
    > post all the time. If you don't like the way people post then start
    > your own moderated ng.


    Thank you for making it clear that you do not even try to communicate
    constructively. If you don't like the way Usenet works, please start
    your own world.

    Mostly just novices and fools crosspost, and the same applies even
    stronger to multiposting (I don't expect you to know the difference).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, May 6, 2011
    #9
  10. Peter Lauren wrote:
    > On May 5, 4:36 pm, "Jukka K. Korpela"<> wrote:
    >> 3.5.2011 22:42, Peter Lauren wrote:
    >>
    >>> I am building a web site

    >>
    >> You multiposted your question. Multiposting is bad. Don't do multipost.
    >>
    >> (I posted my answer to comp.infosystems.www.authoring.misc.)
    >>
    >> --
    >> Yucca,http://www.cs.tut.fi/~jkorpela/

    >
    > I usually don't dignify such remarks with a comment. People cross
    > post all the time. If you don't like the way people post then start
    > your own moderated ng.



    Oops did you step into it. Firstly multipost != crosspost.

    You *did* mulitposted which is always bad. That is posting the same
    message in different newsgroups as *separate* posts.

    Crossposting on the other hand is *sometimes* acceptable when the topic
    applies to more than one group. A crossposted message is only *one*
    message sent as a *single* post but to more than one group at the same
    time, this is accomplished with more than one group listed in the "To:"
    field.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, May 6, 2011
    #10
  11. Peter Lauren

    Peter Lauren Guest

    On May 6, 2:04 pm, "Jonathan N. Little" <> wrote:
    > Peter Lauren wrote:
    > > On May 5, 4:36 pm, "Jukka K. Korpela"<>  wrote:
    > >> 3.5.2011 22:42, Peter Lauren wrote:

    >
    > >>> I am building a web site

    >
    > >> You multiposted your question. Multiposting is bad. Don't do multipost..

    >
    > >> (I posted my answer to comp.infosystems.www.authoring.misc.)

    >
    > >> --
    > >> Yucca,http://www.cs.tut.fi/~jkorpela/

    >
    > > I usually don't dignify such remarks with a comment.  People cross
    > > post all the time.  If you don't like the way people post then start
    > > your own moderated ng.

    >
    > Oops did you step into it. Firstly multipost != crosspost.
    >
    > You *did* mulitposted which is always bad. That is posting the same
    > message in different newsgroups as *separate* posts.
    >
    > Crossposting on the other hand is *sometimes* acceptable when the topic
    > applies to more than one group. A crossposted message is only *one*
    > message sent as a *single* post but to more than one group at the same
    > time, this is accomplished with more than one group listed in the "To:"
    > field.
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com


    Thank you for explaining the difference. Had I cross-posted, this
    pointless discussion about multiposting would be cluttering up two NGs
    instead of one. Yucca appeared to be trying to make that happen
    anyway but I'm not going to waste any more time replying to him.
     
    Peter Lauren, May 6, 2011
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2hhcmVwb2ludEtpZGE=?=
    Replies:
    2
    Views:
    1,768
    Tommy
    Feb 4, 2004
  2. Sam-I-Am
    Replies:
    2
    Views:
    473
    Sam-I-Am
    Jun 23, 2004
  3. John
    Replies:
    5
    Views:
    596
    John Rivers
    Aug 25, 2005
  4. Replies:
    4
    Views:
    956
    M.E.Farmer
    Feb 13, 2005
  5. Replies:
    1
    Views:
    936
    Gabriel Genellina
    Nov 25, 2006
Loading...

Share This Page