Having the same challenge:
Did not help: How to programatically upload a file to Google Docs when
you can't create a java.io.File in App Engine: http://goo.gl/TvwSX
My code so far:

                        MediaByteArraySource ms = new
MediaByteArraySource("TEST TEXT".getBytes(), "text/plain");
                        MediaContent content = new MediaContent();
                        content.setMediaSource(ms);
                        content.setMimeType(new 
ContentType(ms.getContentType()));
                        newDocument.setContent(content);
                        String gdocsFilename = new
String(fileItemName);
                        newDocument.setTitle(new 
PlainTextConstruct(gdocsFilename));
                        URL url = new 
URL("https://docs.google.com/feeds/default/
private/full/?convert=" + doConvert); // DOCUMENT_URL -> i tried
various URLS with and without convert
                        erg = service.insert(url, newDocument);


And the Response is:

com.google.gdata.util.ServiceForbiddenException: Files must be
uploaded using the resumable upload mechanism.
<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</
domain><code>ServiceForbiddenException</code><internalReason>Files
must be uploaded using the resumable upload mechanism.</
internalReason></error></errors>
...........................................
It would be great to have a Version of resumable uploads without
file ... see 
http://googleappsdeveloper.blogspot.com/2011/09/documents-list-api-best-practices_26.html

Might be a change to the API or i did miss something.  Alexander
sorry, no result but work in progress (waiting for help :-).

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to