I have a Blob that I am accessing thus:
BlobContainerClient blobContainerClient = blobServiceClient.GetBlobContainerClient(Container);
BlobClient blobClient = blobContainerClient.GetBlobClient(key);
BlobLeaseClient blobLeaseClient = blobLeaseClientWrapper.GetBlobLeaseClient(blobClient);
blobLeaseClient.Acquire(TimeSpan.FromSeconds(60));
When I come to delete the blob using:
blobClient.Delete();
I get the error:
There is currently a lease on the blob and no lease ID was specified in the request
I've tried breaking the lease but I still get the same error:
blobLeaseClient.Break();
blobClient.Delete();
How do I delete a leased blob?