Achindra Bhatnagar
Published © MIT

Setting Permissions on Blob Storage Container

Update to previous post – "Capturing and Uploading Images to Azure Blob Storage from Universal Windows Apps"

EasyProtip4 hours950
Setting Permissions on Blob Storage Container

Things used in this project

Story

Read more

Code

Code snippet #1

C#
await HttpHandler.tempContainer.CreateIfNotExistsAsync();

BlobContainerPermissions permissions = new BlobContainerPermissions();
permissions.PublicAccess = BlobContainerPublicAccessType.Blob;
await HttpHandler.tempContainer.SetPermissionsAsync(permissions);

blob = HttpHandler.tempContainer.GetBlockBlobReference(blobFileName);
await blob.DeleteIfExistsAsync();
await blob.UploadFromFileAsync(file);

Credits

Achindra Bhatnagar

Achindra Bhatnagar

19 projects • 116 followers
Windows Kernel Hacker, IoT Hobbyist, Enthusiast, Developer and Dreamer
Contact

Comments