我使用[google-drive-sdk]
,我了解如何导出文件here。
我知道fileId
和mimeType
这两个项目是必需的。
当我将mimeType
设置为application/vnd.google-apps.spreadsheet
时,然后单击
按钮EXECUTE
,响应为:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "The requested conversion is not supported.",
"locationType": "parameter",
"location": "convertTo"
}
],
"code": 400,
"message": "The requested conversion is not supported."
}
}
似乎我设置的mimeType错误,如何设置mimeType?
答案 0 :(得分:0)
正如Tanaike所说,当我使用Files: export时,我将text/csv
设置为mimeType
时,响应没有错误。
现在您可以看到正确的答案:
实际上,使用Files: get可以获取详细的下载信息。
例如,在节点exportLinks
中:
“ exportLinks”:{ “ application / x-vnd.oasis.opendocument.spreadsheet”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=ods”, “ text / tab-separated-values”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=tsv”, “ application / pdf”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=pdf”, “ application / vnd.openxmlformats-officedocument.spreadsheetml.sheet”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=xlsx”, “ text / csv”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=csv”, “ application / zip”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=zip”, “ application / vnd.oasis.opendocument.spreadsheet”:“ https://docs.google.com/spreadsheets/export?id=YpDWTfWh5VFtchFYA&exportFormat=ods” }