Hi,

I have a java client that lists and downloads documents using the java
client classes DocsService and DocumentListFeed. In the client, I
would like to know up-front, the default MIMETYPE of a document.

I use feed.getEntries() to return a list of DocumentListEntrys.

My question is this - Is it possible to know the underlying  MIMETYPE
of the DocumentListEntry without actually downloading the document
itself?

For all entries, irrespective of whether they are a word document or a
PDF or a spreadsheet the call: entry.getContent().getType() always
returns 1, indicating that the type is "text". This may be the type of
the entry, however what I really want to know is the MIMETYPE of the
document that the entry represents.

For the moment I have been using the Google inner Class:
DocumentListEntry$MediaType.fromFileName(title).getMimeType() to
derive the MIMETYPE from the document title. However this means that
all documents must be named to include the file extension in the title
e.g "Word.doc" instead of "Word". This then leads to other issues: For
example:

If I place (create or upload) a word document in GoogleDocs called
"Word.doc" and preview it (in Google Docs) it attempts to open
"Word.doc.doc". Preview mostly fails.

Is  there any way to avoid these issues and access the underlying
MIMETYPE of a document via the client data APIS?

regards,
Lara



--~--~---------~--~----~------------~-------~--~----~
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 Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to