azure-storage-blobs

Azure blob storage: Shared access signature for multiple containers?

安稳与你 提交于 2020-02-27 06:56:38
问题 I'm creating an application that will be hosted in Azure. In this application, users will be able to upload their own content. They will also be able to configure a list of other trusted app users who will be able to read their files. I'm trying to figure out how to architect the storage. I think that I'll create a storage container named after each user's application ID, and they will be able to upload files there. My question relates to how to grant read access to all files to which a user

Azure blob storage: Shared access signature for multiple containers?

只愿长相守 提交于 2020-02-27 06:56:29
问题 I'm creating an application that will be hosted in Azure. In this application, users will be able to upload their own content. They will also be able to configure a list of other trusted app users who will be able to read their files. I'm trying to figure out how to architect the storage. I think that I'll create a storage container named after each user's application ID, and they will be able to upload files there. My question relates to how to grant read access to all files to which a user

What's the difference between the SharedAccessBlobPermissions values Add, Create and Write?

此生再无相见时 提交于 2020-02-15 06:53:11
问题 The possible values for SharedAccessBlobPermissions are: None (0) Read (1) Write (2) Delete (4) List (8) Add (16) Create (32) What are the differences between Add , Create and Write ? I can't find any documentation that clarifies this. 回答1: You can find information about these permissions here: https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx. From what I understand reading about these permissions: Add : Add permission is only applicable for append blobs. You use this permission

Creating a blobServiceClient in azure-sdk-for-js with JWT accessToken

时光怂恿深爱的人放手 提交于 2020-02-05 02:34:14
问题 When migrating from v2 to v10 version of a azure SDK javascript library , we have been facing an issue. We need to create a blobServiceClient using the JWT accessToken that has been received from acquireTokenWithAuthorizationCode function in the adal-node library. The options seem limited to us and the examples are few. SimpleTokenCredential class have been removed from the azure-sdk-for-js and thus it cannot be instantiated. Going, through the javascript source code for the azure-sdk-for-js

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 copy blobs from one storage account to another in the same subscription using rest API

橙三吉。 提交于 2020-01-25 21:41:13
问题 I would like to copy blob from one storage account to another storage account in the same subscription using Rest API and PHP. I am able to do a copy blob from one container to another in the same storage account using the below code <?php $date = gmdate('D, d M Y H:i:s \G\M\T'); $account_name = "accname"; $destcontainername = "destcontainer"; $blobname = "blob.png"; $sourcecontainer = "sourcecontainer"; $account_key = "asdf"; $canonicalizedHeaders = "x-ms-copy-source:https://".$account_name.

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).