Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a BlobTrigger binding so that container name is configurable?

I've an azure function with a blob trigger, but I'd like to be able to configure the container from which it is triggered with some configuration parameter that can be changed in the portal, without re-deploy the function.

At the moment the only way I found to define blob-trigger is to hard-code the container name in the function definition

public static void Run([BlobTrigger("photo-files/{name}",...

Is there way to do it in a more configurable way?

like image 205
CodeClimber Avatar asked Dec 03 '25 10:12

CodeClimber


1 Answers

You should be able to use %container% syntax:

public static void Run([BlobTrigger("%container%/{name}",...

and then define the setting called container in application settings.

like image 161
Mikhail Shilkov Avatar answered Dec 05 '25 00:12

Mikhail Shilkov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!