I am getting error trying to upload a PDF file. Anyone having the same
issue?

com.google.gdata.util.InvalidEntryException: Bad Request
Content-Type application/pdf is not a valid media type.

The code is quite simple and same one from the online tutorial:
                DocumentEntry newDocument = new DocumentEntry();
                File documentFile = new File(filePath);
                newDocument.setFile(documentFile);
                // Set the title for the new document. For this example we just 
use
the
                // filename of the uploaded file.
                newDocument.setTitle(new
PlainTextConstruct(documentFile.getName()));
                DocumentListEntry uploaded = service.insert(documentListFeedUrl,
newDocument);


--~--~---------~--~----~------------~-------~--~----~
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 [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-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to