How do I create a copy of an existing file in an Azure Blob Storage container using code? I'm using the WindowsAzure.Storage
NuGet package to handle all operations related to my Azure Blob Storage.
To be 100% clear, I'm trying to create a complete and separate copy of a file that's already been uploaded to a container on Azure Blob Storage. I also want to give the file a new name in the process.
Purely in code, you'll want to use StartCopyAsync()
a method on CloudBlockBlob
, to start the copy process.
One simple way is to use a logic app that triggers on a blob being created that will then copy the blob.
https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-azureblobstorage
If you want to get more sophisticated, you can do a function app.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-storage-blob-triggered-function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With