Page 1 of 1

File upload from browser

Posted: Tue Sep 14, 2004 1:08 am
by CaveGuy
I have a function that I need in newlisp. And I am at a loss :(

given the following form action:

<form action="/upload.cgi" enctype="multipart/form-data" method=post>
<input type=file name=stonehenge>
<input type=submit value=Upload>
</form>

Using upload.exe (dos-cgi) or upload.php see below
the specified file is uploaded and put into an upload directory on the server.
I looked at (put-url) but I dont see a connection :(
I need to do this with a method=post using the method=put from the put-url example always returns REQUEST_METHOD=GET never PUT ?


FYI: The PHP function that provided the function I am looking for is:
move_uploaded_file ( string filename, string destination)

Push the "(" back to the front where it belongs and get rid of the stupid useless coma and it would be perferct :)

I keep hopeing that I have overlooked somthing symple here ....

Posted: Fri Sep 17, 2004 2:59 pm
by Lutz
You need to use method=post and have a put.cgi - handler on your webserver and also enable you webserver for handling put requestst. This is done in Apache as shown in the manual. For IIS I wopuldn't know.

Lutz

ps: editied to 'post'

Posted: Fri Sep 17, 2004 3:14 pm
by Lutz
There is a nice comprehensive explanation of handling PUT requests on the clijent and server at: http://pi3web.sourceforge.net/support/h ... pload.html

Lutz