Prevent the invocation of an Azure Function triggered by a Blob if the size of the file exceeds 50 MB.

suraj jannu 0 Reputation points
2023-08-23T06:50:12.58+00:00

Hello Everyone,

I have a scenario where I need to trigger the Azure Function with Blob Trigger written in .NET programming language only if the file size is less than 50 MB.

Not able to find any such configuration in forums.

Does Azure Function exposes any such configuration to handle ?

Please suggest easy and better approach to solve the problem.

Thanks and regards,

Suraj Jannu

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2023-08-23T14:12:41.03+00:00

    Hello

    I would recommend to use Event Grid between Azure Storage Account and Function App
    Event Grid Model

    Blob events can be filtered by the event type, container name, or name of the object that was created/deleted. Filters in Event Grid match the beginning or end of the subject so events with a matching subject go to the subscriber.

    You can filter by size of the blobs
    https://stackoverflow.com/questions/72782903/is-there-a-way-to-stop-event-grid-from-emitting-empty-records-in-azure-data-expl

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.