I've created an Azure function with a blob storage trigger - I want to process a file and then dump the file out to another blob storage container.
In the simplest case I suppose it would look like this:
public static void Run(Stream blob, string name, out Stream outputBlob, TraceWriter log)
{
outputBlob = blob;
}
These are my bindings:
{
"bindings": [
{
"name": "blob",
"type": "blobTrigger",
"direction": "in",
"path": "input/{name}",
"connection": "wlimportstaging_STORAGE"
},
{
"name": "outputBlob",
"type": "blob",
"direction": "out",
"path": "original/{name}",
"connection": "wlimportstaging_STORAGE"
}
],
"disabled": false
}
I've read from the documentation that if you return a POCO it will serialize it as JSON.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#output-usage
This seems to suggest you can output to a stream - I just seem to be getting:
Microsoft.Azure.WebJobs.Host: Can't bind Blob to type 'System.IO.Stream&
Please assist!