Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google drive api 谷歌硬盘SDK 500拷贝错误_Google Drive Api - Fatal编程技术网

Google drive api 谷歌硬盘SDK 500拷贝错误

Google drive api 谷歌硬盘SDK 500拷贝错误,google-drive-api,Google Drive Api,我是一个web应用程序的技术管理员,我们与驱动器集成,允许用户上传驱动器文件夹中已经存在的文件。在过去的一两天里,我们在执行Files.copy命令时收到了大量的500个错误。我们的日志告诉我们错误是{error:{errors:[[Object]],代码:500,消息:'internalerror'} 有没有关于如何减少此错误发生次数的建议?我们估计有1/4的Google Drive SDK请求会发生这种情况 更多信息,请按要求提供: 下面是用于将文件复制到驱动器的代码 copyDriveFi

我是一个web应用程序的技术管理员,我们与驱动器集成,允许用户上传驱动器文件夹中已经存在的文件。在过去的一两天里,我们在执行Files.copy命令时收到了大量的500个错误。我们的日志告诉我们错误是{error:{errors:[[Object]],代码:500,消息:'internalerror'}

有没有关于如何减少此错误发生次数的建议?我们估计有1/4的Google Drive SDK请求会发生这种情况

更多信息,请按要求提供:

下面是用于将文件复制到驱动器的代码

copyDriveFile = (file, callback) ->
    driveRequest({
        url: "https://www.googleapis.com/drive/v2/files/#{file.id}/copy?key=omitted"
        method: "POST"
        params:
            fileId: file.id
        json:
            title: file.name
        jwt: 
            email: "my-account@developer.gserviceaccount.com"
            keyFile: "file-key.pem"
            scopes: ['https://www.googleapis.com/auth/drive']
        },(err, res, body) ->
            callback err, res, body
            )

你能提供更多关于你想复制什么的细节吗?一个失败的显式命令和完整的http响应?嗨,Cheryl-我已经添加了产生问题的代码副本。file变量是一个googledrive文件对象。driveRequest是一种简化生成JWT身份验证信息的方法。有关它的信息可以在这里找到:我正在为您获取http响应的完整副本。您所说的Google驱动器文件对象是什么意思?什么是mimeType?通过一个Drive file对象,我的意思是从这个请求返回wht:mime类型总是一个本地的Google格式表、文档、演示文稿,或者它是一个pdf。你在所有这些不同的类型上都看到了相同的500?