Azure Function - Resize image stored in a blob container

前端 未结 1 1781
滥情空心
滥情空心 2020-12-11 10:05

I\'ve answered this question related to Azure Webjob and Resizing a image stored as a blob and so I am trying to do the same using a Function App

Each t

相关标签:
1条回答
  • 2020-12-11 10:34

    Yes CloudBlobContainer is supported. I tried a quick sample myself now, and the below function works for me, using the same binding metadata you showed above. I'm also using the same version of the WebJobs SDK in project.json.

    using System;
    using Microsoft.WindowsAzure.Storage.Blob;
    
    public static void Run(
        string blobTrigger, Stream inputBlob, Stream outputBlob,
        CloudBlobContainer container, TraceWriter log)
    {
        log.Info($"Container name: {container.Name}");
    
        log.Info($"C# Blob trigger function processed {blobTrigger}");
        inputBlob.CopyTo(outputBlob);        
    }
    

    Not sure why this wasn't working for you. I have seen some Portal glitches from time to time (bugs we're fixing) that sometimes cause issues.

    0 讨论(0)
提交回复
热议问题