My client has some CGI solution to uploading files in your server. Is a perl script who deals with curl clients, sending requests with files to upload.
In Curl manual (http://www.hmug.org/man/1/curl.php), the solutin for upload files is described as using -F clause, "This causes curl to POST data using the Content-Type multipart/form-data according to RFC1867"
I try to use HttpClient and java.net solutions, and I write some code. But I had two problems: -> In some cases, parameters ('action', 'filename', etc) are not readed from CGI -> If parameters was loaded OK, the file was not found !
My first code, using HttpClient (based in PostMethod class to do the POST):
My next try was to write in an outputstream:
In this two examples, parameters are readed, but not the file. Because the perl CGI reads the file as standard in (some like "$_"), I don�t know how this solution could be implemented.
Has someone leads with curl or another similar solution (in CGI) to uploading files ?
No, tomorrow we rule the world! With this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth