Do HTTP RANGE headers work with Azure Blob Storage Shared Access Signatures?

前端 未结 4 533
礼貌的吻别
礼貌的吻别 2020-12-31 18:35

I\'m using Azure Blob Storage to store media files and providing access to these files using Shared Access Signatures; everything is working well in this regard.

How

4条回答
  •  失恋的感觉
    2020-12-31 19:27

    For those who are struggling with the Azure Service API and the tricky Authorization, I recommend the this very simple C# snippet that does exactly the same in a very simpler way (at least for me).

            var credentials = new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials("storagename", "storagekey");
            var account = new Microsoft.WindowsAzure.Storage.CloudStorageAccount(credentials, true);
            var client = account.CreateCloudBlobClient();
            var properties = client.GetServiceProperties();
            properties.DefaultServiceVersion = "2013-08-15";
            client.SetServiceProperties(properties);
    

    You'll need to add a nuget package WindowsAzure.Storage v9.3.3 (obsolete, but still works)

提交回复
热议问题