Pydrive:如何上传大文件或成块?

问题描述

我正尝试通过PyDrive将较大的csv压缩文件(〜6GB)上传到Google云端硬盘,但是每次我尝试通过以下方式上传

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。它没有文件大小的问题。