Azure / Azure/azure-storage-python

The sasToken in copy_source_url is needed when specify requires_sync=True in copy_blob method.

オープン
#604 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。