On Fri, 2008-10-31 at 09:06 +0100, Andreas Reichel wrote:
> Hi all,
> 
> I've tried several hours without success to create a multipart, that has
> Content-Type: image/png.

You can set the content type for the entity as a hole. I asked the same
question about individual parts only a couple days ago.

This is what I have:
        httpPost.setParams(params);
        httpPost.setEntity(multipartEntity);
        httpPost.addHeader("Authorization", "GoogleLogin auth=" 
                + mAuthToken);
        httpPost.addHeader("Content-Type", "image/jpeg");
 
Christine

> This code:
> --
> File file = File.createTempFile("chart", ".png");
> ImageIO.write(rendImage, "png", file);
> reqEntity.addPart("fileName", new FileBody(file));
> --
> always creates octet/stream, that the server does'nt recognize.
> 
> 
> Please would you give me a friendly hint or even a small example?
> I thank you in advance!
> Best regards!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


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

Reply via email to