【发布时间】:2020-01-22 13:37:30
【问题描述】:
我想导出 google drive 文件,但我以前不知道文件类型。我使用了 drive.files.export 但它需要我不知道的 mimeType。 drive.files.get 中的 mimeType 不能用于导出。如果我只有文件 ID,如何下载文件?
【问题讨论】:
-
我不确定我是否理解您的问题。您不知道要以哪种 mimeType 导出文件?另外,它是 G Suite 文档吗?
-
我不知道它将是什么类型的文件,因为用户可以选择文件。但我设法解决了它。似乎 mimeType 'application/vnd.google-apps.document' 不能用于导出,但 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' 可以。
标签: javascript node.js file google-drive-api export