I have an issue with uploading documents to Google docs( using Google
Standart and Google Aps for Business ).
When I upload a document an error occurs constantly:
<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>InvalidEntryException</code>
<internalReason>Could not convert document.</internalReason>
</error>
</errors>
And when I open Google Docs, I see there is a uploaded document.
But the way when I upload a document using a consumer account (e.g.
Gmail account.) it works perfectly and i don't receive the error.
Fragment source:
URL url = new URL("http://docs.google.com/feeds/default/private/
full/");
DocsService client = new DocsService("MySerciceDocs-v1");
client.setAuthSubToken(token, null);
DocumentEntry newDocument = new DocumentEntry();
MediaContent content = new MediaContent();
content.setMediaSource( new
MediaStreamSource(multipartFile.getInputStream(), contentType));
content.setMimeType(new ContentType(contentType));
newDocument.setContent(content);
newDocument.setTitle(new PlainTextConstruct( "document_name" ));
client.insert( url, newDocument );
Thanks in advance.
Original issue reported on code.google.com by taras...@gmail.com on 27 Jan 2011 at 10:01
Original issue reported on code.google.com by
taras...@gmail.com
on 27 Jan 2011 at 10:01