我已成功上传单个文本文件Google Cloud Storage
。但是,当我尝试上传whole folder
,它提供了许可denied error.
如何使用Python API在Google云端存储上上传文件夹
filename = "d:/foldername" #here test1 is the folder.
Error:
Traceback (most recent call last):
File "test1.py", line 142, in <module>
upload()
File "test1.py", line 106, in upload
media = MediaFileUpload(filename, chunksize=CHUNKSIZE, resumable=True)
File "D:\jatin\Project\GAE_django\GCS_test\oauth2client\util.py", line 132, in positional_wrapper
return wrapped(*args, **kwargs)
File "D:\jatin\Project\GAE_django\GCS_test\apiclient\http.py", line 422, in __init__
fd = open(self._filename, 'rb')
IOError: [Errno 13] Permission denied: 'd:/foldername'
对于整个文件夹。?我认为您需要检查https://developers.google.com/appengine/docs/python/blobstore/#Python_Uploading_a_blob – 2014-09-01 07:16:55
将文件夹压缩并上传。 – voscausa 2014-09-01 11:49:02