The document that contains the replacementcontent will need to contain the
image (and the
text you wish to put together).

The API only allows appending plaintext content.

Eric

On Tue, Jun 23, 2009 at 2:01 AM, quill <quill...@163.com> wrote:

>
> I use the following code to set text and image:
> newEntry.setMediaSource(new MediaByteArraySource("Appending this
> data!".getBytes(), "text/plain")); to set text of the document;
> newEntry.setFile(new File(mPhotoPath), mimeType);
> client.insert(new URL("http://docs.google.com/feeds/documents/private/
> full/"), newEntry);
>
> But it seems the image has replaced the text. I also searched in this
> group, I found no answer.
>
> On Jun 20, 1:49 am, Eric Bidelman <api.e...@google.com> wrote:
> > Yep, there is also this example for your reference:
> http://code.google.com/apis/documents/docs/2.0/developers_guide_java....
> >
> > <http://code.google.com/apis/documents/docs/2.0/developers_guide_java...
> .>
> > Eric
> >
> >
> >
> > On Thu, Jun 18, 2009 at 10:57 PM, quill <quill...@163.com> wrote:
> >
> > > OK, that's my mistake. It should be setmediasource().- Hide quoted text
> -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to