-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathImageBlobTrigger.cs
31 lines (28 loc) · 971 Bytes
/
ImageBlobTrigger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
using System;
using System.IO;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
using System.Linq;
namespace HvidevoldDevelopmentENK.GetPixelArt
{
public static class ImageBlobTrigger
{
[FunctionName("ImageBlobTrigger")]
public static void Run(
[BlobTrigger("opengameart/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob,
string name,
[Queue("imgqueue"), StorageAccount("AzureWebJobsStorage")] ICollector<string> msg,
ILogger log)
{
log.LogInformation($"C# ImageBlobTrigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
var isJpg = name.Split('.').Last().ToLower() == "png";
var isPng = name.Split('.').Last().ToLower() == "jpg";
if (isJpg || isPng) {
msg.Add(name);
}
}
}
}
*/