abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Anderson" <wo...@xoopit.com>
Subject having trouble doing posting an image using AbderaClient.post
Date Wed, 24 Oct 2007 04:33:25 GMT
1st, I am probably missing something really obvious here, but i'll be
verbose in case i'm not.

I'm working on some code based on the provided postToBlogger() example.

i'm looking to post some number of images etc. get the blog based uri for
create an actual blog entry and post that.

i have been able to post a text entry to the example blog (after some issues
with GoogleLoginAuthScheme...)
  i had to add this line into the mix (with code from the example)
   client = new AbderaClient(ABDERA);
   GoogleLoginAuthScheme.register( client, true ); // this was missing i

Anyway, that worked.
so for images i tried (btw, this is the very first thing i do with the
client after i create it and add creds etc.):

        Entry entry = FACTORY.newEntry();
        entry.setUpdated( new Date() );
        entry.setTitle( title );
        entry.setContent( new FileInputStream( "..." ), "image/jpg" );
        return client.post( getUri(), entry, options );

got this:
response = 415 : Unsupported Media Type

i found some rather older looking code on the ibm site:

so i tried something like:

        return client.post( getUri(), new FileInputStream( "..." ), options

i got the same response (at least relative to status code)

i'm hoping there is a really simple way to be posting images using Abdera,
could someone give me some assistance on that?
thanks a lot.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message