newLISP Fan Club

Forum => Anything else we might add? => Topic started by: CaveGuy on September 13, 2004, 06:08:53 PM

Title: File upload from browser
Post by: CaveGuy on September 13, 2004, 06:08:53 PM
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 ....
Title:
Post by: Lutz on September 17, 2004, 07:59:11 AM
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'
Title:
Post by: Lutz on September 17, 2004, 08:14:37 AM
There is a nice comprehensive explanation of handling PUT requests on the clijent and server at: http://pi3web.sourceforge.net/support/howto/FileUpload.html



Lutz