How to get a BlobTrigger with a stream in Azure Function - isolated process

Verburgh, I (Ivo) 55 Reputation points
2023-03-06T15:53:44.1066667+00:00

We have an Azure Function that make use of a BlobTrigger.

The function is triggered when a new file is placed in a specific subfolder and you receive a Stream with the content of the blob.

We understood that if we want to stay up to date with our Azure Functions, that it is smart to update them to .NET 8: https://techcommunity.microsoft.com/t5/apps-on-azure-blog/net-on-azure-functions-roadmap-update/ba-p/3619066

.NET 8 only supports isolated process Azure Functions and when we tried this out, we noticed that the Blob Trigger in Isolated process doesn't have a Stream anymore, but only a string with the full content of the blob as described in this page: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger

This is way slower in performance, plus that there is a maximum size of 100MB which isn't sufficient for our use cases where we can have files up to 1GB.

When can we expect a BlobTrigger with a Stream (like in-process) for an Azure Function - Isolated process?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2023-03-08T18:16:14.9933333+00:00

    Verburgh, I (Ivo) Thanks for posting your question in Microsoft Q&A. I understand the slow performance in using string. In general, we recommend using byte[] if the blob is small since it loads the entire blob contents into memory.

    Good news! We have stream for blobs in preview and here is the announcement: Public Preview: SDK type bindings and reference doc: SDK types (preview). Please follow the instructions in our reference doc in using preview packages and also, we have a sample in our repo: BlobStreamFunction.

    [Function(nameof(BlobStreamFunction))]
            public async Task BlobStreamFunction(
                [BlobTrigger("stream-trigger/{name}")] Stream stream, string name)
            {
                using var blobStreamReader = new StreamReader(stream);
                var content = await blobStreamReader.ReadToEndAsync();
                _logger.LogInformation("Blob name: {name} -- Blob content: {content}", name, content);
            }
    

    We appreciate your feedback and if you face issues, let me know or feel free to submit it via https://github.com/Azure/azure-functions-dotnet-worker/issues. [No ETA for GA]. I hope this helps with your question and let me know if you have any other questions.


    If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.