Quent,

It sounds like the server is not processing the multi-part post and is just storing all bytes received as the file. Perhaps a multi-part message is not required. Have you tried just sending the file as the content of a plain PostMethod?

Mike

Querent wrote:
Hi Odi,

Thanks for your quick reply. I have already succeed uploading file
using MultipartPostMethod. I have to download the file back for
future reference. I have already tried downloading the file both
using GetMethod and PostMethod, but again I get the whole response
file (not the content).

Thanks.

Quent



Ortwin_Gl�ck <[EMAIL PROTECTED]> wrote: Quent,

I guess you are trying to make a file upload with Multipart MIME
encoded attachments. HttpClient can not parse such responses, but it
can send such requests. Consider using the Commons FileUpload
component for your problem. AFAIK the FileUpload guys have a release
pending and the current code is stable.

Odi

Querent wrote:

Hi.. I am new to httpclient. I am developing a program that
download a file. I've got the response using : InputStream
bodyStream = postMethod.getResponseBodyAsStream();

When I write the bodyStream to a file, it write the whole response
things. (I only want to save the file).

Is there anyway I could get only the content of the file ?

I attached my downloaded file.


Unfortunately attachments > 100 KB get stripped by the list.


many thanks in advance.

Cheers,

quent


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to