我想BLOB的文件名传递给httptrigger,通过get请求如下。
http://localhost:7071/api/CSVDataMigrationHttpTrigger/testdata.csv
代码湛蓝的功能
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = "CSVDataMigrationHttpTrigger/{name}")]
HttpRequest req, string name,
[Blob("csvdata-upload/{name}", FileAccess.Read, Connection = "AzureWebJobsStorage")]
Stream inputBlob, ILogger log)
{}
inputBlob参数没有解决,它返回null。
但是,如果我给的文件名作为“testData.csv”为下文BLOB参数,然后inputBlob得到妥善解决。
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = "CSVDataMigrationHttpTrigger/{name}")]
HttpRequest req, string name,
[Blob("csvdata-upload/testData.csv", FileAccess.Read, Connection = "AzureWebJobsStorage")]
Stream inputBlob, ILogger log){}