But the function never runs when you upload blobs. What is the most likely cause?
medium
A. Blob triggers require HTTP requests to start
B. The Blob trigger path is incorrect or container name is wrong
C. The function is missing a Timer trigger
D. The function must use Queue trigger instead
Solution
Step 1: Check Blob trigger path
The Blob trigger listens to a specific container path; if the container name or path is wrong, it won't trigger.
Step 2: Eliminate other causes
Timer triggers or HTTP requests are unrelated; Blob triggers respond to storage changes only.
Final Answer:
The Blob trigger path is incorrect or container name is wrong -> Option B
Quick Check:
Blob trigger needs correct container path to run [OK]
Hint: Blob trigger must match exact container path [OK]
Common Mistakes:
Expecting Timer or HTTP triggers to start Blob
Wrong container or path in BlobTrigger attribute
Confusing Blob and Queue triggers
5. You want to run an Azure Function every day at 3 AM and also process any new files uploaded to a Blob container immediately. Which trigger types should you combine in your solution?
hard
A. HTTP trigger for schedule and Queue trigger for file uploads
B. Blob trigger for schedule and HTTP trigger for file uploads
C. Queue trigger for schedule and Timer trigger for file uploads
D. Timer trigger for schedule and Blob trigger for file uploads
Solution
Step 1: Identify trigger for scheduled runs
Timer triggers run functions on schedules like daily at 3 AM.
Step 2: Identify trigger for file uploads
Blob triggers respond immediately to new files uploaded to Blob storage.
Step 3: Combine triggers correctly
Use Timer trigger for scheduled runs and Blob trigger for file events.
Final Answer:
Timer trigger for schedule and Blob trigger for file uploads -> Option D
Quick Check:
Schedule = Timer, File upload = Blob trigger [OK]
Hint: Schedule needs Timer; file events need Blob trigger [OK]