John Brayton
John Brayton

Reputation: 13

What are these Google Drive MIME types?

The Google Drive API documents a list of supported MIME types. I am confused by this subset of that list:

These MIME types are not reflected in any item I have been able to add to Google Drive either via the desktop agent or via the web interface. How would one create a file on Google Drive with, for example, the MIME type "application/vnd.google-apps.photo"? Is it only possible through the API? Is that even possible?

Thank you.

Upvotes: 1

Views: 2222

Answers (1)

Burcu Dogan
Burcu Dogan

Reputation: 9213

It's possible to create files with these mime types. You can either create blank files or convert an existing file format to one of them during the upload. For example, if you have a CSV file, setting convert flag to true will create a new application/vnd.google-apps.spreadsheet file. This is an example for the Java client:

service.files().insert(metaData, csvFileContent).setConvert(true).execute();

You can always create blank files with these mime types.

Upvotes: 1

Related Questions