I am trying to write to a blob (txt-file) from my Azure function, however, nothing happens: no blobs are created, no exceptions are thrown. I've taken the Blob-trigger code from here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#output
This is my code:
[FunctionName("ProcessFiles")]
public static void Run(
[BlobTrigger("sample-items/sample-file.csv", Connection = "sample-connection")] Stream myBlob,
[Blob("sample-items/validationResult.json", FileAccess.Write)] Stream validationOutput,
TraceWriter log)
{
log.Info($"C# Blob trigger function Processed blob\n Size: {myBlob.Length} Bytes");
using (var sw = new StreamWriter(validationOutput, Encoding.UTF8))
{
try
{
sw.Write("HELLO WORLD");
sw.Flush();
}
catch (Exception ex)
{
}
}
}
These are my Nuget packages: Microsoft.NET.Sdk.Functions 1.0.10.
The blob container has "Private access" policy