title: Upload file to SFTP location from Azure Function
body: <p>I'm working with Azure Functions 2.0 and I need to fetch documents from CosmosDB, format them into a single CSV file and upload it to an SFTP location.</p>
  
  <p>I'm able to query and fetch documents via the CosmosDB input binding and will be probably use the CSVHelper library to handle CSV formatting. But I can't seem to find an SFTP output binding. I've checked:</p>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings#supported-bindings" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings#supported-bindings</a></p>
  
  <p><a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob?tabs=csharp#output" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob?tabs=csharp#output</a></p>
  
  <p>Apparently, there used to be an External File trigger/binding which has been deprecated (<a href="https://stackoverflow.com/questions/44734460/corrupt-file-when-using-azure-functions-external-file-binding/44734647#44734647">Corrupt file when using Azure Functions External File binding</a>)</p>
  
  <p>What is the best way to stream upload a file to an SFTP location from an Azure Function?</p>