File upload from browser

Started by CaveGuy, September 13, 2004, 06:08:53 PM

Previous topic - Next topic

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 ....
Bob the Caveguy aka Lord High Fixer.

Lutz

#1
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'

Lutz

#2
There is a nice comprehensive explanation of handling PUT requests on the clijent and server at: http://pi3web.sourceforge.net/support/howto/FileUpload.html">http://pi3web.sourceforge.net/support/h ... pload.html">http://pi3web.sourceforge.net/support/howto/FileUpload.html



Lutz