apache / apache/libcloud

OSSStorageDriver upload_object & download_object_via_stream Issue

Open
#1,563 1 comment 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
2.1k
Forks
931
Avg merge
1d 2h
Merged PRs (30d)
4

Description

在使用libcloud调用aliyun oss时遇到以下两个问题:
1. upload_object: libcloud.common.types.InvalidCredsError: b'\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一样的逻辑。

Contributor guide

Open the contributing guide

Research direction

Start with OSSStorageDriver.upload_object and OSSConnection.request, checking how the Container object is passed and how the request host is selected. Compare download_object_via_stream with download_object; done means the upload uses the container's regional host and streaming download follows the existing download logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.