Losing content-type when persisting to Azure blob storage

I’ve got an Azure function which persists files sent in the request to blob storage. For some reason — even though the files have a content-type — they’re being persisted with the application/octet-stream content-type, rather than say, image/jpeg. var file = req.Form.Files["File"]; var blobClient = new BlobContainerClient(connection, containerName); var blob = blobClient.GetBlobClient(fileName); await blob.UploadAsync(file.OpenReadStream()); Any… Read More Losing content-type when persisting to Azure blob storage

Azure Functions – Dynamic blob container in Blob binding

I need to add files to an Azure Storage Account using an Azure Function App with a Queuetrigger. But the container needs to be added dynamically. How is that possible? public static async Task Run( [QueueTrigger("activitylogevents", Connection = "StorageConnectionAppSetting")] Log activitylogevents, Dynamic ==> [Blob("{dynamicc container}/dev/bronze/logs.json", FileAccess.Read)] Stream streamIn, ILogger log) { … Code doing stuff… Read More Azure Functions – Dynamic blob container in Blob binding

How to upload file to virtual folder in blob container?

I’m currently working on a function to upload a file to a virtual folder that is in my blob container. E.g. I want to upload the file into "container1\folder" rather than "container1". So far, I am able to upload the file directly into the container with the following code: filename = "test.txt" file_path = "C:\Users\____\Desktop\test.txt"… Read More How to upload file to virtual folder in blob container?

Download a file from sas token

I have created a storage_account with a container named data. In that container I have a single .zip file. I’m generating an Account Key SAS Token with Read permission directly on the data container : The Blob SAS URL looks like this : https://<STORAGE_ACCOUNT&gt;.blob.core.windows.net/data?sp=r&st=2022-06-06T15:23:31Z&se=2022-06-06T23:23:31Z&spr=https&sv=2020-08-04&sr=c&sig=<SIGNATURE> How am I supposed to download my zip file from that… Read More Download a file from sas token

Azure Blob triggered function storage account connection

Hi I’m creating a new blob triggered azure function and I wanted to understand the role of the "Connection=" param in the header of the function: public void Run([BlobTrigger("workitems/{name}", Connection = "")]Stream myBlob, string name, ILogger log) What I did is to completely remove that param and after I deployed it to my azure subscription,… Read More Azure Blob triggered function storage account connection