Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
132 stars 147 forks source link

How to copy blob from one storage account to another storage account #351

Open neelam256 opened 4 years ago

neelam256 commented 4 years ago

Hello,

I tried to copy blob for a given blob path from one storage account to another storage account, but it failed. With start_copy I can successfully copy with in the same storage account. Please guide used method : start_copy(const cloud_blob& source)

Thanks Neelam

Jinming-Hu commented 4 years ago

@neelam256 If the source blob is from another storage account, you have to authorize the source blob with SAS token. In this case, you need this overload of start_copy.

You may also need get_shared_access_signature to generated a SAS token.