apache / libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
https://libcloud.apache.org
Apache License 2.0
2.04k stars 925 forks source link

OSSStorageDriver upload_object & download_object_via_stream Issue #1563

Open binarilly opened 3 years ago

binarilly commented 3 years ago

在使用libcloud调用aliyun oss时遇到以下两个问题:

  1. upload_object: libcloud.common.types.InvalidCredsError: b'<?xml version="1.0" encoding="UTF-8"?>\n\n NonStandardHostForbidden\n Your host is invalid. Please use Open Storage Service standard host.\n 60420052D987C1303869C56D\n oss.aliyuncs.com\n\n' 查明原因是因为在OSSStorageDriver调用upload_object时没有将传入Container对象传递到OSSConnection的request方法,导致调用OSS api的时候host设置为默认的oss.aliyun.com 而不是 regionxxx.oss.aliyun.com。
  2. download_object_via_stream: 没有实现流式下载的方法,和download_object一样的逻辑。
stale[bot] commented 3 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.