Open imeya opened 5 years ago
I found this issue a few days ago. Previously the function worked fine with require_sync=True, but stopped working out of the blue. I wonder if Azure have made a change on the remote end that is tripping it up somewhere.
Hi @imeya thanks for reaching out!
It's expected behavior but we should definitely improve the doc. I'll make sure the behavior is more clearly explained.
Hi @theocranmore, nothing was changed, maybe your sources were public before?
FYI the REST API doc is here.
@zezha-msft , thanks for looking into this issue. And why it needs the sasToken in the source_url, since both the destionation / source container are in the same storage account? can you help explain why?
Hi @imeya, it was the service's decision to make it that way, my guess is that unlike its asynchronous counterpart, synchronous copy also supports external sources (that are outside of Azure), it's simpler to always require authentication on the source so that the logics are simpler in general and easier to communicate.
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:
Some other observations:
Could you please let me know if it's by design or it's a bug? I cannot find any docs about it.