azure-storage-blobs

Set expiry limit for blob

[亡魂溺海] 提交于 2019-12-01 14:55:15
问题 I'm using Azure-Storage for storing information like a cache mechanism. So, for given input I'm doing the job for first time and after that I'll save the result in the cache for further use. When I'll need to solve the problem with same given input, I'll get it directly the already ready solution from storage. This all is implemented. I'm trying to add a expiry limit for file in my cache. Each result will be stored for maximum 30 days. After that, they will be automatically deleted. The naive

Azure Static Website Hosting

半世苍凉 提交于 2019-12-01 14:32:48
问题 Is there any way to host static website (HTML + CSS + JS) in Azure? Like we do Amazon S3 Static Website hosting, they charge only for storage. 回答1: UPDATE: 29-June-2018 It is now possible to host static websites in Azure Storage. You can read more about it here: https://docs.microsoft.com/en-gb/azure/storage/blobs/storage-blob-static-website As of today, no. Azure doesn't have an equivalent of that. You can however host static sites as Web Apps and for free as well if you're comfortable with

Azure storage: Uploaded files with size zero bytes

十年热恋 提交于 2019-12-01 13:44:22
问题 When I upload an image file to a blob, the image is uploaded apparently successfully (no errors). When I go to cloud storage studio, the file is there, but with a size of 0 (zero) bytes. The following is the code that I am using: // These two methods belong to the ContentService class used to upload // files in the storage. public void SetContent(HttpPostedFileBase file, string filename, bool overwrite) { CloudBlobContainer blobContainer = GetContainer(); var blob = blobContainer

Use wildcards in WASB ListBlobs

蓝咒 提交于 2019-12-01 13:40:44
I'm using Azure .Net SDK to list all blobs from Windows Azure Storage Blob container. let client = account.CreateCloudBlobClient() let container = client.GetContainerReference("my-container") let list = container.ListBlobs("data/2014-*-17/", false) // ! here as you can see i'm trying to filter blobs by wildcarded prefix. UPD Not supported as 07/2019 Unfortunately this won't work as Azure Storage does not allow you to do server-side wild card filtering. Only filtering option available to you server-side is prefix filtering. So what you would do is list blobs names of which starts with data/2014

Windows azure REST API to List containers issue

随声附和 提交于 2019-12-01 12:11:44
I'm trying to list the containers in my windows azure storage account. but i'm struck with an exception "The remote server returned an error: (403) Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.." But i have included the signature as per the instructions given, do any one find any mistake in my code ? private static String SignThis(string StringToSign,string Key,string Account) { String signature = string.Empty; byte[] unicodeKey = Convert.FromBase64String(Key); using (HMACSHA256 hmacSha256 = new HMACSHA256

How to properly upload video files to Azure Media Services from angularjs

北战南征 提交于 2019-12-01 12:00:25
问题 For my scenario, our current app is begin coded in html5 and angularjs communicating with web api. I have a workflow scenario that I seem to not be able to find an end to end example for. I would like to allow users of my website to upload videos and images to Azure Media Services. I found several examples that seem to move the data from a web page to blob storage and then copy over to azure media services. Is there a way to upload the file directly to Media Services, instead of having a

Getting null value for Azure blob last modified property

孤街浪徒 提交于 2019-12-01 11:55:06
I'm getting null when I'm trying to fetch LastModified property of Azure Blob, below is the snippet for the same. CloudStorageAccount storageAccount = CloudStorageAccount.Parse("account"); CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); CloudBlobContainer container = blobClient.GetContainerReference("folder"); var blobs = container.ListBlobs(); foreach (var blob in blobs) { CloudBlockBlob blockBlob =container.GetBlockBlobReference(blob.ToString()); var timemodified = blockBlob.Properties.LastModified; } value fetched in blob above is not a CloudBlobDirectory. Thanks in

How to properly upload video files to Azure Media Services from angularjs

南笙酒味 提交于 2019-12-01 11:43:15
For my scenario, our current app is begin coded in html5 and angularjs communicating with web api. I have a workflow scenario that I seem to not be able to find an end to end example for. I would like to allow users of my website to upload videos and images to Azure Media Services. I found several examples that seem to move the data from a web page to blob storage and then copy over to azure media services. Is there a way to upload the file directly to Media Services, instead of having a temporary and permanent blob container(one tied to AMS), as this approach seems to force me to have an

Error binding Blob to IAsyncCollector when binding to output blob in Async method

杀马特。学长 韩版系。学妹 提交于 2019-12-01 11:12:51
I'm trying to bind to a blob output in an Async method following this post: How can I bind output values to my async Azure Function? I have multiple output bindings so just returning is not an option public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, IAsyncCollector<string> collection, TraceWriter log) { if (req.Method == HttpMethod.Post) { string jsonContent = await req.Content.ReadAsStringAsync(); // Save to blob await collection.AddAsync(jsonContent); return req.CreateResponse(HttpStatusCode.OK); } else { return req.CreateResponse(HttpStatusCode.BadRequest); } } My

Microsoft Azure Storage Service APIs removal on december 2015

别等时光非礼了梦想. 提交于 2019-12-01 10:13:12
问题 As a Microsoft Azure services client, I received earlier today the following mail: http://aka.ms/Qga48e. I was wondering how I could migrate my Blob storage without services disruption to use the latest Azure File Storage service. Anybody has already performed this action? Any feedbacks will be welcomed. Thanks. 回答1: I don't think that it would be necessary. Besides Azure Blob Service and Azure File Service serve different purposes all together and the things you could do with blob service