File upload from browser

For the Compleat Fan
Locked
CaveGuy
Posts: 112
Joined: Sun Oct 13, 2002 3:00 pm
Location: Columbus Ohio
Contact:

File upload from browser

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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'

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked