Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void Do()
- {
- CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=wtapocstorage;AccountKey=hpL+PSwgvcbxTM9mfjSxX3c0zeyitNmbTGNO29AK1Kzwz+wUg1I30gpr4s7tx1KCl1/Fjf/9Pi8ZNjh1KLLi/A==");
- // Create a new access policy for the account.
- SharedAccessBlobPolicy policy = new SharedAccessBlobPolicy()
- {
- Permissions = SharedAccessBlobPermissions.Read,
- SharedAccessExpiryTime = DateTime.UtcNow.AddHours(24),
- };
- var client = storageAccount.CreateCloudBlobClient();
- CloudBlobContainer container = client.GetContainerReference("asset-669ffb43-f058-4252-8fa5-5f0a9937bfde");
- var blobRef = container.GetBlobReference("test-video_480x272_400.mp4");
- var sig = blobRef.GetSharedAccessSignature(policy, null, null, null, new IPAddressOrRange("37.17.43.12"));
- Console.WriteLine(blobRef.Uri + sig);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement