nerdexam
Microsoft

AZ-204 · Question #355

Suppose your Azure Function has a blob trigger associated with it and you want it to execute only when images are uploaded. Which of the following blob trigger Path values should you use?

The correct answer is D. samples-workitems/{name}.png. To trigger an Azure Function only for image files in a blob container, the blob trigger path should include the specific file extension, such as '.png'.

Submitted by andres_qro· Mar 30, 2026Develop Azure compute solutions

Question

Suppose your Azure Function has a blob trigger associated with it and you want it to execute only when images are uploaded. Which of the following blob trigger Path values should you use?

Options

  • Asamples-workitems/{name}
  • Bsamples-workitems/{name}/png
  • Csamples-workitems/{name}?png
  • Dsamples-workitems/{name}.png

How the community answered

(69 responses)
  • A
    14% (10)
  • B
    6% (4)
  • C
    4% (3)
  • D
    75% (52)

Why each option

To trigger an Azure Function only for image files in a blob container, the blob trigger path should include the specific file extension, such as '.png'.

Asamples-workitems/{name}

samples-workitems/{{name}} would trigger for any file uploaded to the 'samples-workitems' container, regardless of its extension.

Bsamples-workitems/{name}/png

samples-workitems/{{name}}/png implies a folder structure where 'png' is a subfolder, not a file extension filter for the blob name.

Csamples-workitems/{name}?png

samples-workitems/{{name}}?png uses a question mark, which is not the correct syntax for filtering by file extension in a blob trigger path.

Dsamples-workitems/{name}.pngCorrect

In an Azure Blob Storage trigger path, appending '.png' to {{name}} acts as a filter, ensuring the function only triggers when a blob matching the samples-workitems/{name}.png pattern is created or updated. This specifically targets files with the '.png' extension in the 'samples-workitems' container.

Concept tested: Azure Blob Storage trigger path filtering

Source: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=in-process%2Cextensionv5&pivots=programming-language-csharp#usage

Topics

#blob trigger#path filter#Azure Functions#blob storage

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice