Azure / Azure/azure-storage-python
The sasToken in copy_source_url is needed when specify requires_sync=True in copy_blob method.
- 主要语言
- Python
- 星标
- 343
- 派生
- 243
- PR 合并指标
- 30 天内没有已合并 PR
描述
I used the copy_blob method to copy blobs **in the same storage account**, and both of the **containers are private**.
If I did not specify the sasToken in the copy_source_url, then an error occured, like below:
**HTTP status code=404. ErrorCode: CannotVerifyCopySource. The specified resource does not exist.**
The completed code is as below:
```
from azure.storage.blob import BlockBlobService
accountName="xxx"
accountKey="xxx"
blobs = BlockBlobService(account_name=accountName,account_key=accountKey)
#copy_source_url
copySource="https://xxxx.blob.core.windows.net/f22/gen2.JPG"
blobs.copy_blob("dest_container","dest_blob_name",copySource,requires_sync=True)
```
Some other observations:
1. if the source container is public, it works without specify sasToen
2. if the source container is private, but remove the requires_sync=True, it can work well.
Could you please let me know if it's by design or it's a bug? I cannot find any docs about it.
贡献指南
调研方向
首先,使用私有容器、不带 SAS 令牌的 copy_source_url 以及 requires_sync=True,复现报告中的 copy_blob 调用。将其与公共源以及省略 requires_sync 的情况进行比较;完成标准是确定 404 是预期行为还是 bug,并记录或修正该行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- cloud
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 38/100