azure-storage

Create Azure blob/fileshare container through ARM template

核能气质少年 提交于 2020-02-01 14:12:58
问题 I am looking a way to create a container in Azure blob & file-share storage through ARM template. At present I have ARM template to provision the storage accounts, but I want to create containers also in ARM. { "name": "[parameters('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "location": "[resourceGroup().location]", "apiVersion": "[variables('storageApiVersion')]", "sku": { "name": "[variables('storageAccountType')]" }, "dependsOn": [ ], "tags": { "Environment": "

Create Azure blob/fileshare container through ARM template

烈酒焚心 提交于 2020-02-01 14:08:49
问题 I am looking a way to create a container in Azure blob & file-share storage through ARM template. At present I have ARM template to provision the storage accounts, but I want to create containers also in ARM. { "name": "[parameters('storageAccountName')]", "type": "Microsoft.Storage/storageAccounts", "location": "[resourceGroup().location]", "apiVersion": "[variables('storageApiVersion')]", "sku": { "name": "[variables('storageAccountType')]" }, "dependsOn": [ ], "tags": { "Environment": "

Upload BlockBlob to Azure Storage using React

本秂侑毒 提交于 2020-01-30 12:13:52
问题 I haven't been able to get a working example. My following example tells me that the createBlockBlob method is undefined. Note: I've also tried createBlockBlobFromLocalFile and passed in the filename and still no luck. import React from 'react'; var storage = require('azure-storage'); const CONNECTION_STRING = "MYCONNECTIONSTRING"; const BlockBlobContainerName = "MYCONTAINERNAME"; const BlobName = "MYBLOBNAME"; class NumberUploader extends React.Component { render() { return ( <div className=

Azure File Storage Error: Condition Headers Are Not Supported

不想你离开。 提交于 2020-01-29 05:11:06
问题 When attempting to download a PDF file to a browser directly from Azure File Storage I get this error: <Error> <Code>ConditionHeadersNotSupported</Code> <Message> Condition headers are not supported. RequestId:a84ee68e- 001a-001b-4223-bff5e7000000 Time:2017-04-27T06:57:22.2002199Z </Message> </Error> Edge: Blank page or blank page with frozen loading indicator. FireFox: Second time, shows dialog to download file. Chrome: Blank page or When PDF Documents “Open PDF files in default PDF viewer

Querying on Azure table storage doesnt work beyond a certain number of entities?

穿精又带淫゛_ 提交于 2020-01-25 19:57:24
问题 Consider my scenario. I have about 200 partitions and each partition has about 1000 rowkeys(entities) or even more. So when i am making any query fetching records of a partition which is albhabetically last(starting with "z"), it doesnt return any results. Below is a sample query - audioRecordServiceContext.QueryableEntities .Where(p => p.PartitionKey == channel && p.IsDedication == true && p.IsBroadcast == true && p.BroadcastTime >= time && p.BroadcastTime < time.AddHours(1)) .ToList(); When

MobileServiceInvalidOperationException: Error: Bad request

拥有回忆 提交于 2020-01-25 10:58:09
问题 I've been struggling for hours to try and upload data to an Azure database (mobile service). My datamodel on the Azure database: My model in Xamarin Forms (the class): public class Test { public string Id { get; set; } [JsonProperty("XAxis")] public int XAxis { get; set; } [JsonProperty("YAxis")] public int YAxis { get; set; } } Writing the data to Azure: var test = new Test { XAxis = 100, YAxis = 200 }; await client.GetTable<Test>().InsertAsync(test); However when I execute this I will get

MobileServiceInvalidOperationException: Error: Bad request

耗尽温柔 提交于 2020-01-25 10:58:07
问题 I've been struggling for hours to try and upload data to an Azure database (mobile service). My datamodel on the Azure database: My model in Xamarin Forms (the class): public class Test { public string Id { get; set; } [JsonProperty("XAxis")] public int XAxis { get; set; } [JsonProperty("YAxis")] public int YAxis { get; set; } } Writing the data to Azure: var test = new Test { XAxis = 100, YAxis = 200 }; await client.GetTable<Test>().InsertAsync(test); However when I execute this I will get

Using Bearer tokens along with azure-sdk-for-js

守給你的承諾、 提交于 2020-01-25 09:15:09
问题 We are building a nodejs server, which authenticates the user using AAD . We get a JWT accessToken from the Microsoft login endpoint when a user logs in to our app. How do we use this token to make calls to get the blobs/containers using this javascript API? I don't want to make direct ajax requests to the API's using the ( Authorization: Bearer accessToken ) calls. I have succeeded in using postman like this to make the calls? How do I do this programmatically using blobServiceClient ? 回答1:

Azure blob upload rename if blob name exist

a 夏天 提交于 2020-01-24 21:23:47
问题 In Azure blob upload, a file is overwritten if you upload a new file with the same file name (in the same container). I would like to rename the new file before saving it, to avoid overwriting any files - Is this possible? Scenario: Upload file "Image.jpg" to container "mycontainer" Upload file "Image.jpg" to container "mycontainer" (with different content) Rename second "Image.png" to "Image_{guid}.jpg" before saving it to "mycontainer". 回答1: You cannot rename a blob (there's no API for it).

ASP.NET Core Application Logs Not Written To Blob in Azure App Service

♀尐吖头ヾ 提交于 2020-01-24 13:19:08
问题 I've enabled application logging to a blob for an app service on Azure. I can view the logs in the log stream from the Azure portal I can see that a file like xxxxx-#####.applicationLog.csv is being created each hour in the Azure storage account I created, but this file doesn't actually contain the my application logs I tried enabling Web Server logging to storage on the same account, and that did work - I could see the logs for HTTP requests in a different file I tried creating a new storage