public static class MyBlobTrigger
{
[FunctionName("MyBlobTrigger")]
public static void Run(
[BlobTrigger("myqueue/{name}", Connection = "DBString")] Stream myBlob, string name,
ILogger log)
{
log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}
}
Convert to JSON object…
public static void Run(
[BlobTrigger("order-processed/{name}", Connection = "MyAzureWebJobsStorage")] Stream myBlob, string name,
ILogger log)
{
StreamReader reader = new StreamReader(myBlob);
Order data = JsonConvert.DeserializeObject<Order>(reader.ReadToEnd());
}
Comments