setMimeTypes() for 'application/vnd.google-apps.document'

842 views
Skip to first unread message

cdunn

unread,
Aug 2, 2012, 7:16:28 PM8/2/12
to google-p...@googlegroups.com
I'm having some issues filtering for Google Docs from the 'all doc types' view. (using ViewId.DOCUMENTS works, but i'm trying to get it to filter with other types as well) 

Example...
new google.picker.View(google.picker.ViewId.DOCS).setMimeTypes("application/vnd.google-apps.document");

...does not display any regular Google Docs for me although each of the following work fine:

new google.picker.View(google.picker.ViewId.DOCUMENTS);

or

new google.picker.View(google.picker.ViewId.DOCS).setMimeTypes("application/vnd.google-apps.spreadsheet");

...

Do I not have the right gdocs mime type?  Or might this be a bug?

Thanks for any assistance.
Message has been deleted
Message has been deleted

Jon Emerson

unread,
Aug 2, 2012, 10:09:30 PM8/2/12
to google-p...@googlegroups.com
I'm curious - Why is google.picker.View(google.picker.ViewId.DOCUMENTS) not enough for you?  What in DOCUMENTS do you want to filter out?

On Thu, Aug 2, 2012 at 2:04 PM, Caio T <ca...@google.com> wrote:
EDIT: Sorry, you don't want a space between the two mimetypes.


On Thursday, August 2, 2012 2:03:35 PM UTC-7, Caio T wrote:
Hi Cdunn,

This isn't a bug :) What's happening is that "application/vnd.google-apps.document" is the mimetype for docs created prior to the migration to kix. So you're only going to get the documents (if any) that were created some time ago.

If you prefer to use the mimetypes instead of the ViewId.DOCUMENTS, you can do:

new google.picker.View(google.picker.ViewId.DOCS).setMimeTypes("application/vnd.google-apps.document,application/vnd.google-apps.kix");

That should give you all of your Google documents (not spreadsheets, presentations, etc).
Hope that helps!
Caio

cdunn

unread,
Aug 2, 2012, 10:22:26 PM8/2/12
to google-p...@googlegroups.com
Using 'application/vnd.google-apps.kix' as the MIME type works, thanks for this.

@jon: I want a filtered list of Google Docs as well as PDF's/Word Docs/txt/etc that were uploaded to Google Drive.  ViewId.DOCUMENTS does not list any of my uploaded Google Drive PDF's.

On Thursday, August 2, 2012 12:16:28 PM UTC-7, cdunn wrote:

Jon Emerson

unread,
Aug 2, 2012, 10:51:58 PM8/2/12
to google-p...@googlegroups.com
Oh cool.  Ya, you're just gonna have to list a bunch of comma-delimited mimetypes.
Reply all
Reply to author
Forward
0 new messages