python-3.x - Pydrive:如何上传大文件或分块上传?

标签 python-3.x google-drive-api pydrive

我正在尝试通过 PyDrive 将一个大型 csv 压缩文件(~6GB)上传到 Google Drive,但每次我尝试通过以下方式上传时:

file = self.drive.CreateFile({
  'title': file_name,
  'parents': [{ 'id': parent_id }],
  'mimeType': mime_type,
})
file.SetContentFile(file_path)
file.Upload()
我收到以下错误:httplib2.RedirectMissingLocation: Redirected but the response is missing a Location: header. .
我正在使用 Python 3.7。
有谁知道我是否可以通过 Pydrive 上传大文件或逐块上传?
提前致谢!

最佳答案

尝试改用 pydrive2 库。 https://github.com/iterative/PyDrive2 .它没有文件大小的问题。

关于python-3.x - Pydrive:如何上传大文件或分块上传?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64054230/

相关文章:

python - 使用 google-drive-api python 获取文件的链接

Python:将谷歌驱动器中的文件复制到特定文件夹中

python - Pydrive:防止 Google Drive 授权过期。

python - 如何给时间加零

python-3.x - 尽管之前的实现工作正常,但可整除计算器仍失败

android - 错误 : ConnectionResult{statusCode=INTERNAL_ERROR, 分辨率 = null}

python - 从 Colaboratory 删除文件而不移动到废纸篓

python - 聚合 Pandas 中的聚合值会返回错误的结果

python - 如何分割字符串并在分割前添加元素的字符串位置?

php - Google drive api 将共享文件夹添加到我的文件