I have an Azure function and i would like to have an input blob in my azure function and then when i read it in c# code the input parameter is null.
Here is the function.json:
{
"bindings": [
{
"authLevel": "function",
"name": "req",
"type": "httpTrigger",
"direction": "in"
},
{
"name": "$return",
"type": "http",
"direction": "out"
},
{
"type": "blob",
"name": "inputBlob",
"path": "mystorageacountname/containername/file.csv",
"connection": "mofunctions_STORAGE",
"direction": "in"
}
],
"disabled": false
}
C# code is printing null:
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, string inputBlob, TraceWriter log)
{
// trying to print the name of inputBlob variable
return req.CreateResponse(HttpStatusCode.OK, "blob", inputBlob);
}
Any help is appreciate it?