azure-storage

Unable to upload to blob storage, missing Access-Control-Allow-Origin header

情到浓时终转凉″ 提交于 2020-06-28 08:10:22
问题 Using the @azure/storage-blob module in the browser, it's not possible to upload to azure storage directly. It complains about a missing request header. The upload is done from within a ReactJS app running as an Office Add-in. As required by Microsoft, CORS have been enabled on storage account for blobs. I tried finding a way to add custom HTTP Headers however, none worked. Here's the upload code import { Credential, BlobServiceClient} from "@azure/storage-blob/browser/azure-storage-blob.min

“404 Resource Not Found” From Azure Blob Storage Document from PUT

依然范特西╮ 提交于 2020-06-25 07:23:09
问题 I'm attempting to do a PUT request to create a new BLOB. After some initial trouble with Authorization header, I am now getting a 404 Resource Not Found error when I attempt to PUT a file into a container. I feel rather certain that I have the URL right: https://accountNameHere.blob.core.windows.net/containerNameHere I have checked and re-checked to make sure that I'm including the container name and the account name, and they're both correct. What else could be causing this (aside from the

Check space used in azure storage accounts in my subscription

隐身守侯 提交于 2020-06-23 05:39:48
问题 How can I check how much space I used in each of my azure storage accounts in my subscription resource group wise. I am not able to find a way to check space used in azure storage account through PowerShell, CLI, portal... 回答1: Azure Storage size consist of all of 4 services (Blob, Queue,File, Table) altogether. Based on my knowledge, there are no ways to calculate the total size of all services for now. However, you could get blob space used on Portal by using Azure metrics. Please select

Check space used in azure storage accounts in my subscription

浪尽此生 提交于 2020-06-23 05:39:13
问题 How can I check how much space I used in each of my azure storage accounts in my subscription resource group wise. I am not able to find a way to check space used in azure storage account through PowerShell, CLI, portal... 回答1: Azure Storage size consist of all of 4 services (Blob, Queue,File, Table) altogether. Based on my knowledge, there are no ways to calculate the total size of all services for now. However, you could get blob space used on Portal by using Azure metrics. Please select

Azure Blob Storage - Changing permissions of a container and accessing with SAS

醉酒当歌 提交于 2020-06-18 16:57:06
问题 I have an Azure Blob container which contains a few blobs. The container was created (successfully) with the code: if (container.CreateIfNotExists()) { var permissions = container.GetPermissions(); permissions.PublicAccess = BlobContainerPublicAccessType.Off; container.SetPermissions(permissions); } You'll see the permissions are set to private (i.e., PublicAccess is Off ). In a later portion of my code, I would like to open the permissions using SAS , with an expiration of 1 hour . To

Azure Blob Storage - Changing permissions of a container and accessing with SAS

最后都变了- 提交于 2020-06-18 16:56:50
问题 I have an Azure Blob container which contains a few blobs. The container was created (successfully) with the code: if (container.CreateIfNotExists()) { var permissions = container.GetPermissions(); permissions.PublicAccess = BlobContainerPublicAccessType.Off; container.SetPermissions(permissions); } You'll see the permissions are set to private (i.e., PublicAccess is Off ). In a later portion of my code, I would like to open the permissions using SAS , with an expiration of 1 hour . To

Azure Blob Storage - Changing permissions of a container and accessing with SAS

佐手、 提交于 2020-06-18 16:56:48
问题 I have an Azure Blob container which contains a few blobs. The container was created (successfully) with the code: if (container.CreateIfNotExists()) { var permissions = container.GetPermissions(); permissions.PublicAccess = BlobContainerPublicAccessType.Off; container.SetPermissions(permissions); } You'll see the permissions are set to private (i.e., PublicAccess is Off ). In a later portion of my code, I would like to open the permissions using SAS , with an expiration of 1 hour . To

Azure Blob Storage - Changing permissions of a container and accessing with SAS

末鹿安然 提交于 2020-06-18 16:56:08
问题 I have an Azure Blob container which contains a few blobs. The container was created (successfully) with the code: if (container.CreateIfNotExists()) { var permissions = container.GetPermissions(); permissions.PublicAccess = BlobContainerPublicAccessType.Off; container.SetPermissions(permissions); } You'll see the permissions are set to private (i.e., PublicAccess is Off ). In a later portion of my code, I would like to open the permissions using SAS , with an expiration of 1 hour . To

Azure CLI edit Content Type file property

徘徊边缘 提交于 2020-06-17 15:53:07
问题 I'm trying to update Content Type property of a file located in my Azure $web blob container using Azure CLI. I'm trying to do this because it's wrongly set and my service-worker.js (for my PWA) needs to have "application/javascript" instead of "text/plain; charset=utf-8" in order to be registered. 回答1: When using Azure cli, you should use az storage blob update. The sample code: az storage blob update --container-name xxx --name xxx --account-key xxx --account-name xxx --content-type

Azure CLI edit Content Type file property

微笑、不失礼 提交于 2020-06-17 15:50:27
问题 I'm trying to update Content Type property of a file located in my Azure $web blob container using Azure CLI. I'm trying to do this because it's wrongly set and my service-worker.js (for my PWA) needs to have "application/javascript" instead of "text/plain; charset=utf-8" in order to be registered. 回答1: When using Azure cli, you should use az storage blob update. The sample code: az storage blob update --container-name xxx --name xxx --account-key xxx --account-name xxx --content-type