When you want to create a new blob in your code Azure Functions
kemurayama
Posted on April 25, 2020
You can create a new blob file by writing like below.
Plus {rand-guid} generate guid. It is useful !!
Storage Account Setting is set by Storage Account Attribute.
[FunctionName("MyTestFuncion")]
[StorageAccount("StorageConnectionAppSetting")]
public static async Task Run([EventHubTrigger("myeh", Connection = "EHConnection")] EventData[] events,
Binder binder,
ILogger log)
...
using (var writer = await binder.BindAsync<TextWriter>(
new BlobAttribute("<container>/{rand-guid}.json")))
{
writer.Write(<what you want to write>);
}
đź’– đź’Ş đź™… đźš©
kemurayama
Posted on April 25, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.