Click to See Complete Forum and Search --> : File upload


thakkarharsh
September 23rd, 1999, 02:21 AM
Hi all,
I am designing a site and want to provide a link on one of the pages through
which the user can select a file from his pc and upload it on the server.
How can i do that ? i think servlets can come to my help but how ? and is
there any other way than servlets ? My site is running on AS/400 machine and
i have to do a lot to enable servlets on it.
Can you please do a favour to send me the answer through e-mail. For me
access to web is uncertain - my email-id is harshthakkar@pmsindia.com
Thanx in anticipation.
-Harsh

Leon
September 23rd, 1999, 05:34 AM
You should use the tag input
<input type=file name=myfile>
Da file will be send automaticly by the browser
and it depends on what kind of webserver you are using
It is not necessery to use servlets, nut any kind of CGI programs
that can run on your webserver

Leon

unicman
September 23rd, 1999, 07:59 AM
Also u will need to give 'ENCTYPE' to 'form' tag. ie ENCTYPE=multipart/form-data

otherwise only the name of the file will be sent, and not the contents.

- UnicMan
http://members.tripod.com/unicman