You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Christine <ch...@christine.nl> on 2008/10/30 13:32:31 UTC

ContentType in FileBody

Hi,
I'm probably overlooking something, but how do I set the content-type in
a filebody in a multipart message? By default it gets set to
"application/octetstream" but it needs to be "image/jpeg". I'm trying to
upload a file to Picasaweb.

dagdag
Christine

-- 
dagdag is just a two character rotation of byebye
www.christine.nl


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: ContentType in FileBody

Posted by Thuannd <nh...@yahoo.com>.
try VS HTMLParser build 8
http://www.nabble.com/file/p20288587/htmlparser2.png 

http://downloads.sourceforge.net/binhgiang/HTMLParser2_Build8.zip?modtime=1225620536&big_mirror=0
Download 
-- 
View this message in context: http://www.nabble.com/httpclient-and-xpath-tp20229074p20288587.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: ContentType in FileBody

Posted by Christine <ch...@christine.nl>.
On Fri, 2008-10-31 at 14:18 +0100, Oleg Kalnichevski wrote:
> On Thu, 2008-10-30 at 13:32 +0100, Christine wrote:
> > Hi,
> > I'm probably overlooking something, but how do I set the content-type in
> > a filebody in a multipart message? By default it gets set to
> > "application/octetstream" but it needs to be "image/jpeg". I'm trying to
> > upload a file to Picasaweb.
> > 
> > dagdag
> > Christine
> > 
> 
> It is an oversight on my part. Please open a change request in JIRA.
> Subclassing FileBody and overriding #getMediaType(), #getSubType() and
> #getMimeType() would be a reasonable workaround.

That's what I've done, took less than three minutes to get it working.
I'll open a request in jira.

Christine

> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: ContentType in FileBody

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-10-30 at 13:32 +0100, Christine wrote:
> Hi,
> I'm probably overlooking something, but how do I set the content-type in
> a filebody in a multipart message? By default it gets set to
> "application/octetstream" but it needs to be "image/jpeg". I'm trying to
> upload a file to Picasaweb.
> 
> dagdag
> Christine
> 

It is an oversight on my part. Please open a change request in JIRA.
Subclassing FileBody and overriding #getMediaType(), #getSubType() and
#getMimeType() would be a reasonable workaround.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org