1
votes

Using objective-c Google Docs API, I'm uploading to Google Docs html entries (using mime type text/html) with images encoded in base64.

The html img tag appears like:

<img src='data:image/jpeg;base64,myEncodedString' />, 

where myEncodedString is the img data encoded with base64.
The upload is successful, except that the image isn't displayed.
The encoding is right (I've succeeded in decoding the string back to the original image).
The rest of document is well displayed with the right formatting (font, size, color etc, set in the html).

Is a Google Docs server problem? or?

EDIT

I'm trying to use base64 encoding 'cause the images are local ones.

1
Sorry, I haven't specified what language I'm using. I'm using the objective-c Google Docs api to create some docs from an iphone app. When I sign in to my account I can see the new docs, but instead of the image I see a light yellow area. - Sefran
I am facing the exact same problem :-( ... 7 years later :-(( but in JS. When I upload text/html emails with inline images in base64 format to Google Docs, the images vanish. The only way to get them appear in Google Docs, is to store them and provide a publicly available url. - rd3n

1 Answers

0
votes

Remove the space between the comma and the string.