Google Drive API无法在IE11上运行?

时间:2017-12-11 23:19:06

标签: google-drive-api internet-explorer-11

我有一个JS应用程序,用户在使用" Google Picker" API,我使用Google驱动程序SDK来检索缩略图或导出文档正文。但是,在IE11上,每当我尝试这样做时,我都会得到404.API会调用Edge,Chrome,FF,Safari等所有工作,只能在IE11上失败。

以下是一个示例:

Key Value
Request GET /drive/v3/files/<FILEID>/export?mimeType=text/html&key=<KEY> HTTP/1.1
Accept  */*
X-JavaScript-User-Agent google-api-javascript-client/1.1.0
X-Requested-With    XMLHttpRequest
X-Goog-Encode-Response-If-Executable    base64
X-ClientDetails appVersion=5.0%20(Windows%20NT%206.3%3B%20Trident%2F7.0%3B%20.NET4.0E%3B%20.NET4.0C%3B%20rv%3A11.0)%20like%20Gecko&platform=Win32&userAgent=Mozilla%2F5.0%20(Windows%20NT%206.3%3B%20Trident%2F7.0%3B%20.NET4.0E%3B%20.NET4.0C%3B%20rv%3A11.0)%20like%20Gecko
X-Origin    http://www.example.com
X-Referer   http://www.example.com
Referer https://content.googleapis.com/static/proxy.html?usegapi=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.9jt-JkHEOKs.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCNrivnJk2F0x6tjQPseAPkqN62frA
Accept-Language en-US
Accept-Encoding gzip, deflate
User-Agent  Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
Host    content.googleapis.com
Connection  Keep-Alive
Cache-Control   no-cache
DNT 1

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "File not found: <FILEID>.",
    "locationType": "parameter",
    "location": "fileId"
   }
  ],
  "code": 404,
  "message": "File not found: <FILEID>."
 }
}

这是Google驱动API中的已知问题还是我遗漏了什么?

1 个答案:

答案 0 :(得分:0)

您遇到此错误的原因是该文件确实不存在,或者您没有documentation中所述的您尝试阅读的文件的读取权限。

您需要执行的操作是向文件所有者报告它不存在,或者向所有者请求该文件的权限。