Skip to content

Instantly share code, notes, and snippets.

@javan
Last active June 24, 2023 18:22
Show Gist options
  • Save javan/7343255 to your computer and use it in GitHub Desktop.
Save javan/7343255 to your computer and use it in GitHub Desktop.
Google Drive's undocumented MIME types

The Google Drive API supports these MIME types, but if you try to filter using them, you may find you're not getting the document types back that you expect. Especially when using setMimeTypes() with Google's JavaScript Picker.

Here are the poorly documented or completely undocumented MIME types I discovered:

If you want application/vnd.google-apps.document, also use application/vnd.google-apps.kix. Source.

If you want application/vnd.google-apps.spreadsheet, also use application/vnd.google-apps.ritz. Via a private email from a Google employee.

If you want application/vnd.google-apps.presentation, also use application/vnd.google-apps.punch. Source.

If you want application/vnd.google-apps.form, also use application/vnd.google-apps.freebird. Discovered by inspecting a "form" file: mimeType: "application/vnd.google-apps.freebird", name: "Reform", serviceId: "docs".

Enjoy!

@mtuckerinaz
Copy link

Sorry to bump something a little old, but geez. thanks for posting this!

@Brodan
Copy link

Brodan commented Dec 4, 2016

Any idea if there is an alternative MIME type for Google Apps Scripts? I'm trying to upload an Apps Script via the Drive API but its uploading it as plain text.

@romantylets
Copy link

Thanks a lot for information! You make my day!

@cristimocean
Copy link

"Why in the world are these undocumented?"
Because everything about Google services is a piece of shit . Full stop. This is not the first or the last of issues.
Every single service they have has ton of these undocumented gotchas.
Google services are a minefield !

@fuhrmanator
Copy link

Very nice to find this (trying to find the Google files while withdrawing from GSuite since Google's unlimited storage for universities is no longer).

Why in the world are these undocumented?

Maybe the answer is another question: How many sharp developers stay on the same project for more than a year?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment