Hi, PDF upload is not yet supported through the API. To request it, please star the feature request linked below:
http://code.google.com/p/gdata-issues/issues/detail?id=591 Thanks - Jochen On Sep 26, 8:05 pm, kj <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---
