azure-storage

Azure storage files force download to browser

自闭症网瘾萝莉.ら 提交于 2021-01-28 07:03:19
问题 I have my files stored in Azure File System and here are the requirements - User should be able to view the documents without downloading it to the local This is working fine for pdf but not any other mime types I tried setting Content-Type , Content-Disposition (in azure file properties but no luck) and also iframe. User should be able to edit the doc online without downloading. I don't think this is possible just with Azure and have to integrate with One Drive may be? Correct me if I am

Dialogs keep their variable values in new conversation in MS BotFramework v4

帅比萌擦擦* 提交于 2021-01-28 04:22:29
问题 I'm using MS BotFramework v4. There is a RootDialog which starts Dialog_A or Dialog_B depending on what the user input is. TL;DR If a new conversation is started after a conversation and the bot isn't restarted, private variables of dialogs to which a value (which is not the initial value) has already be assigned, are not reseted to their initial value leading to unexpected behavior. How can this be avoided? Detailed Let's assume the following scenario: Each of these dialogs has some private

Container name for media asset on Azure Media Services

回眸只為那壹抹淺笑 提交于 2021-01-28 02:56:26
问题 How do I set the name of the container when creating an asset for Windows Azure Media Services? Calling my CloudMediaContext like this to create a new asset creates a new container in blob storage with the name "asset-[newGuid]" e.g. "asset-f230411a-22a0-4813-9187-4b815dbfdf12". var assetName = "foobar"; var asset = _mediaContext.Assets.Create(assetName, assetCreationOptions); Background info on the call above by Nick Drouin (who works at MS on AMS) "Under the hood, the call above will:

Selectively deleting images uploaded to Azure blob (Django/Python project)

岁酱吖の 提交于 2021-01-28 00:57:30
问题 In a Django (Python) project, I'm using Azure blobs to store photos uploaded by users. The code simply goes something like this: from azure.storage.blob import BlobService blob_service = BlobService(account_name=accountName, account_key=accountKey) blob_service.put_blob( 'pictures', name, # including folder content_str, # image as stream x_ms_blob_type='BlockBlob', x_ms_blob_content_type=content_type, x_ms_blob_cache_control ='public, max-age=3600, s-maxage=86400' ) My question is: what's the

Upload multiple files from folder to Azure Blob storage using Azure Storage SDK for Python

大城市里の小女人 提交于 2021-01-27 11:40:00
问题 I have some images in a local folder on my windows machine. I want to upload all images to the same blob in the same container. I know how to upload a single file with Azure Storage SDKs BlockBlobService.create_blob_from_path() , but I do not see a possibility to upload all images in the folder at once. However, the Azure Storage Explorer provides a functionality for this, so it must be possible somehow. Is there a function providing this service or do I have to loop over all files in a

Set content type when uploading to Azure Blob Storage

我的未来我决定 提交于 2021-01-23 06:21:45
问题 I am uploading a static site using the Azure Blob storage client library. blob_service_client = BlobServiceClient.from_connection_string(az_string) blob_client = blob_service_client.get_blob_client(container=container_name, blob=local_file_name) print("\nUploading to Azure Storage as blob:\n\t" + local_file_name) with open('populated.html', "rb") as data: test = blob_client.upload_blob(data, overwrite=True) This is working but the HTML file is downloading instead of displaying. This is

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

与世无争的帅哥 提交于 2021-01-20 11:43:37
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

懵懂的女人 提交于 2021-01-20 11:42:46
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

How to specify multiple file types for Azure Function Blob Trigger input binding?

风格不统一 提交于 2021-01-07 03:53:55
问题 I'm looking to only allow the upload of specific filetypes to Azure Storage to trigger an Azure Function. Current function.json file: { "scriptFile": "__init__.py", "bindings": [{ "name": "myblob", "type": "blobTrigger", "direction": "in", "path": "{name}.json", "connection": "storage-dev" }] } Would I just add another path value like this... "path": "{name}.json", "path": "{name}.csv" ...or an array of values like this... "path": [ "{name}.csv", "{name}.json" ] Can't seem to find an example

How to generate azure blob storage SAS url using java?

余生长醉 提交于 2021-01-07 01:20:29
问题 I want to generate a SAS url that i can share with user to connect to storage account and upload a file to any location. How can i generate the SAS url using java api. i found one documentation but looks like all api are depreciated https://azuresdkdocs.blob.core.windows.net/$web/java/azure-storage-blob/12.0.0/com/azure/storage/blob/sas/BlobServiceSasSignatureValues.html Env: Java Version: 8.0 BLOB STORAGE JAVA SDK: group: 'com.azure', name: 'azure-storage-blob', version: '12.8.0' 回答1: There