SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Not able to replace the document's content for PDF documents #211

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Updating a document's contents fails for PDF documents using the example
for updating the document's content at 
http://code.google.com/intl/en/apis/documents/docs/3.0/developers_guide_java.htm
l#UpdatingReplaceContentAndMetadata

Modified sample:
File file = new File("/path/to/file/newer_data.pdf");
String mimeType =
DocumentListEntry.MediaType.fromFileName(file.getName()).getMimeType();
entry.setMediaSource(new MediaFileSource(file, mimeType));
entry.setTitle(new PlainTextConstruct("Newer Title"));
DocumentListEntry updatedEntry = entry.updateMedia(true);

What is the expected output? What do you see instead?
I expect the document's content to be updated, but instead I receive an
Internal Server Error.

What version of the product are you using? On what operating system?
Using jars in gdata-src.java-1.39.1.zip on Windows XP

Original issue reported on code.google.com by joshuami...@gmail.com on 17 Nov 2009 at 9:57

GoogleCodeExporter commented 9 years ago
Not sure what changed on the server side in the last few days, but this is now 
working.

Original comment by joshuami...@gmail.com on 25 Nov 2009 at 8:58

GoogleCodeExporter commented 9 years ago

Original comment by vbarat...@gmail.com on 7 Dec 2009 at 5:23