Posting file with ClientHTTPConnection
Hi,
I have been trying to upload a file using the HTTP post method for, and the ClientHTTPRequest class made available on the web at:
http://www.devx.com/Java/Article/17679/0/page/3
by its author, for more than a day. I am calling post, but the file is not being posted. The file should, according to the doc, be attached by act of using a the setRequestParameter method for a file value. No luck please help.
The relevant portion of my code is:
req.setParameter("Filename", testFile );
req.setParameter("Content-Type:", "multipart/form-data; boundary=" + req.boundary);
req.setParameter("Content-disposition", "form-data; name=\"Log\"; filename=C:\\finalFile.txt");
InputStream is = req.post("filename", testFile);
Thanks,

