Uploading files using Java API.

54 views
Skip to first unread message

Pawan Chopra

unread,
May 18, 2011, 9:13:56 AM5/18/11
to google-docum...@googlegroups.com
Hi All,

I am trying to upload files using Java API in Google Docs. I am able to upload PDF, doc files. But when I am trying to upload Excel files I am getting exception saying could not convert to doc. Also when I am trying to upload exe files its throwing exception that No media enum is specified for EXE.

Can any one guide me how can I upload any kind of file in Google Docs using Java API(in case it is possible.)

Vic Fryzel

unread,
May 20, 2011, 6:25:25 PM5/20/11
to google-docum...@googlegroups.com
Were you using a Gmail account or Google Apps for Business account?

The error about not being able to convert that Excel file probably means the Excel file is corrupt.  You can upload the file regardless by saying ?convert=false in your URL.

For EXE files, use a MIME type of application/octet-stream.  If you give me a stack trace I can help you track down where the "No media enum is specified for EXE" error is coming from.

Thanks,
-Vic
Reply all
Reply to author
Forward
0 new messages