以下每个文件扩展名的 MIME 类型是什么:
- 文档
- 滑动
- 表格
- 绘图
谷歌文档:
application/vnd.google-apps.document
application/vnd.google-apps.kix
谷歌演示文稿:
application/vnd.google-apps.presentation
谷歌电子表格:
application/vnd.google-apps.spreadsheet
谷歌绘图:
application/vnd.google-apps.drawing
请参阅此处了解更多信息。
以下是一长串 Google Docs 和 Google Drive MIME 类型(并非详尽无遗):
application/vnd.google-apps.audio
application/vnd.google-apps.document
application/vnd.google-apps.drawing
application/vnd.google-apps.file
application/vnd.google-apps.folder
application/vnd.google-apps.form
application/vnd.google-apps.fusiontable
application/vnd.google-apps.kix
application/vnd.google-apps.photo
application/vnd.google-apps.presentation
application/vnd.google-apps.script
application/vnd.google-apps.sites
application/vnd.google-apps.spreadsheet
application/vnd.google-apps.unknown
application/vnd.google-apps.video
这是我的 MimeTypes 列表
"application/vnd.google-apps.audio"
"application/vnd.google-apps.document"
"application/vnd.google-apps.drawing"
"application/vnd.google-apps.file"
"application/vnd.google-apps.folder"
"application/vnd.google-apps.form"
"application/vnd.google-apps.fusiontable"
"application/vnd.google-apps.photo"
"application/vnd.google-apps.presentation"
"application/vnd.google-apps.sites"
"application/vnd.google-apps.spreadsheet"
"application/vnd.google-apps.unknown"
"application/vnd.google-apps.video"
"application/pdf"
"application/msword"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"application/vnd.ms-powerpoint.presentation.macroEnabled.12"
"application/vnd.ms-excel"
"image/jpeg"
"audio/mpeg"
"video/mpeg"
"application/zip"
"text/plain"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"application/vnd.android.package-archive"
"application/vnd.google-apps.kix"
(2016 年 7 月)@Ali的答案今天仍然有效,回答了关于 G Suite/Google Apps(文档、表格、幻灯片等)文件的特定 MIME 类型是什么的 OP 问题。
然而,在Google Drive API的情况下,澄清/组织各种支持的 MIME 类型也很重要,这些 MIME 类型用于在上传到Drive 时导入文件,即纯文本 [或 Word] 文件到 Google Docs,以及导出从云端硬盘下载时的 G Suite 编辑器文件,即CSV 格式的表格文件。
对于那些尝试创建新的可编辑 Google 文档的人,请尝试以下操作
DocumentApp.create("My new GDoc");