I have a Azure HTTP trigger POST function. When ever it gets the POST request, it insert the data into text file and store it in Azure BLOB storage. I want to store that file into File sharing storage instead BLOB storage. I don't the Azure File sharing storage in output binding of the function. Does it even possible?
run.csx
#r "Newtonsoft.Json"
#r "Microsoft.WindowsAzure.Storage"
using System.Net;
using System.Web;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json;
using Microsoft.WindowsAzure.Storage.Blob;
public static async Task<IActionResult> Run(HttpRequest req, CloudBlockBlob outputBlob)
{
var requestBody = await new StreamReader(req.Body).ReadToEndAsync();
await outputBlob.UploadTextAsync(requestBody);
}
function.json
{
"bindings": [
{
"authLevel": "function",
"name": "req",
"type": "httpTrigger",
"direction": "in",
"methods": [
"get",
"post"
]
},
{
"name": "$return",
"type": "http",
"direction": "out"
},
{
"type": "blob",
"name": "outputBlob",
"path": "customers/CUST_{DateTime}.txt",
"connection": "AzureWebJobsStorage",
"direction": "out"
}
]
}