title: Azure Functions - Blob Stream output binding
body: <p>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.</p>
  
  <p>In the simplest case I suppose it would look like this:</p>
  
  <pre><code>public static void Run(Stream blob, string name, out Stream outputBlob, TraceWriter log)
  {
      outputBlob = blob;
  }
  </code></pre>
  
  <p>These are my bindings:</p>
  
  <pre><code>{
    "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
  }
  </code></pre>
  
  <p>I've read from the documentation that if you return a POCO it will serialize it as JSON.</p>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#output-usage" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#output-usage</a></p>
  
  <p>This seems to suggest you can output to a stream - I just seem to be getting: </p>
  
  <p><code>Microsoft.Azure.WebJobs.Host: Can't bind Blob to type 'System.IO.Stream&amp;</code></p>
  
  <p>Please assist!</p>