0

I am using 0.5.0 webjobs SDK with a very basic code:

public static void AjouterFiligramme2(
[BlobTrigger(@"images-input/{name}")] Stream inputStream,
[Blob(@"images-output/{name}")] Stream outputStream)

{
WebImage image = new WebImage(inputStream);

image.AddTextWatermark("copyright untel", fontSize: 20, fontColor: "red");

var bytes = image.GetBytes();
outputStream.Write(bytes, 0, bytes.Length);
}

But I got a error 404 on the outputStream parameter. InputStream works fine I checked that images-output container has been created by the SDK so I don't even understand the message

I also checked that the code is working on premises with my tests images

If anybody has ideas

1 Answers1

0

By default (no second parameter) the BlobAttribute makes the stream readable, meaning that the blob must exist. Otherwise you get back a 404.

Use the second parameter to make the stream writable and your code should work.

Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103
  • For those who want to try this sample I struggle a lot with another problem Don't forget to push the rights dependencies into the zip fThe best is to set copy local to true. I also had to add System.Web.WebPage version 2.0 to make the job working on Azure – Frédéric De Lène Mirouze Sep 10 '14 at 07:23