How to identify MIME types for Google Workspace file formats

I’m working on a project where I need to handle different Google Workspace file types programmatically. I’m having trouble figuring out the correct MIME types for these specific file extensions:

  • gdoc files (Google Documents)
  • gslide files (Google Slides presentations)
  • gsheet files (Google Spreadsheets)
  • gdraw files (Google Drawings)

I’ve been searching through the documentation but can’t find a clear reference for these MIME types. Does anyone know where I can find this information or have experience working with these file formats? I need to set up proper content type handling in my application and want to make sure I’m using the right MIME types for each format.

I encountered a similar challenge while developing an application that interfaces with Google Workspace files. The file extensions .gdoc, .gsheet, .gslide, and .gdraw are unique to Google and don’t follow standard MIME types like other common formats. The correct MIME types you should use are: ‘application/vnd.google-apps.document’ for Google Docs, ‘application/vnd.google-apps.presentation’ for Google Slides, and ‘application/vnd.google-apps.spreadsheet’ for Google Sheets. It’s also wise to consult the Google Drive API documentation for the latest updates on MIME types for exporting files, as this can help you avoid issues related to content type management.

hit this same issue last week! for google draw files, use ‘application/vnd.google-apps.drawing’ - the other answer didn’t mention that one. quick heads up: these mime types only work with google’s apis. if you want to download the files, you’ll need to convert them to standard formats like pdf or docx first.

Working with Google Workspace file formats can be challenging, especially regarding their MIME types. I’ve previously dealt with this issue while integrating Google Drive into my application. The correct MIME types are as follows: ‘application/vnd.google-apps.document’ for Google Docs, ‘application/vnd.google-apps.presentation’ for Google Slides, ‘application/vnd.google-apps.spreadsheet’ for Google Sheets, and ‘application/vnd.google-apps.drawing’ for Google Drawings. It’s crucial to note that these MIME types are specific to Google’s API and not standard formats. If you plan to export these files, consider converting them to formats like .docx or .pdf, as direct downloads are not available.