Example #1
0
 public static void Run([BlobTrigger(Config.UploadContainer + "/{name}")] Stream inputBlob,
                        [Blob(Config.WatermarkedContainer + "/{name}", FileAccess.Write)] Stream outputBlob,
                        string name,
                        TraceWriter log)
 {
     try
     {
         WaterMarker.WriteWatermark(WaterMarkText, inputBlob, outputBlob);
         log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {inputBlob.Length} Bytes");
     }
     catch (Exception e)
     {
         log.Error($"Watermaking failed {e.Message}");
     }
 }
 public static void Run([BlobTrigger("images/{name}")] Stream inputBlob,
                        [Blob("images-watermarked/{name}", FileAccess.Write)] Stream outputBlob,
                        string name,
                        ILogger log)
 {
     try
     {
         WaterMarker.WriteWatermark(WaterMarkText, inputBlob, outputBlob);
         log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {inputBlob.Length} Bytes");
     }
     catch (Exception e)
     {
         log.LogError($"Watermaking failed {e.Message}");
     }
 }