It seems the <INPUT type="file" name="files"> can only upload one file at a
time .
How to upload more than one files at the same time?

Thanks!

James


----- Original Message -----
From: guillaume ORIOL <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 22, 2000 5:58 AM
Subject: Re: File upload..


> Do you now the way I can put a value in the <INPUT type="file"...> field?
>
> > Hi,
> > first of all you should use ENCTYPE="multipart/form-data" METHOD="post"
in
> > your FORM. If you have the following form:
> >
> > <FORM action="http://server.com/cgi/handle"
> >        enctype="multipart/form-data"
> >        method="post">
> >    <P>
> >    What is your name? <INPUT type="text" name="submit-name"><BR>
> >    What files are you sending? <INPUT type="file" name="files"><BR>
> >    <INPUT type="submit" value="Send"> <INPUT type="reset">
> >  </FORM>
> >
> > and you type Larry and choose file1.txt your user agent will send back
to
> > the server the followings:
> >
> > Content-Type: multipart/form-data; boundary=AaB03x
> >
> >    --AaB03x
> >    Content-Disposition: form-data; name="submit-name"
> >
> >    Larry
> >    --AaB03x
> >    Content-Disposition: form-data; name="files"; filename="file1.txt"
> >    Content-Type: text/plain
> >
> >    ... contents of file1.txt ...
> >    --AaB03x--
> >
> > So you have to:
> > -use getHeader("Content-type") with somme processing to retrieve the
> > boundary(AaB03x in our case)
> > -use getInputStream() to obtain the stream containing de request data.
> > -retrieve the content of the file from the stream using boundary value.
> >
> > Maybe you don't have to work so hard if your server has already somme
> > classes for doing all this stuff.
> >
> > Bye
> >
> > -----Original Message-----
> > From: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> > Sushant Kumar
> > Sent: Monday, August 21, 2000 4:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: File upload..
> >
> >
> > Hi all..
> >
> > I am trying to upload a file to my server using Form. I am setting one
of
> > the the input's type as File. But, on the servlet side I couldn't find
any
> > method to read the request's data as file..
> > does anyone has any idea about how to do this?? I am using web-server
> > provided with jswdk1.0.1.
> >
> > Regards,
> > Sushant
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> --
> Guillaume ORIOL
> --------------------------------------------------------------------------
----------------------------
> The information contained in this email is privileged and confidential,
> intended only for the use of the individual or entity to whom it is
> addressed. If the reader of this email is not the intended recipient,
> you are hereby notified that any dissemination, distribution or copying
> of this email is strictly prohibited. If you have received this email in
> error, please notify the sender immediately by email and delete this
> email. Any views expressed in this email are those of the individual
> sender unless the sender specifically states otherwise.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to