2

I use the following code to add multiple messages to an Azure Storage Queue through an output binding on my Azure Function:

context.bindings.myQueue = [];
for (var msg of messages) {
    context.bindings.myQueue.push(msg);
}

This doesn't seem possible with a Blob output binding, I can store a blob using context.bindings.myBlob = {...} but I don't see a way to add multple blobs at once.

The data I'm trying to save to my Blob Storage is quite large so I would like to split it up into chunks and save them separately.

Is this possible through an output binding or would I have to use the azure-storage module to do this manually?

1 Answer 1

2

Multiple blob outputs for the same output binding are not currently supported. For now, your best option would be to pull in the storage module. If your input blobs are roughly the same size, another perhaps hacky option would be to define N static output bindings, and divide the blob into N chunks each time.

We do have an open issue for supporting dynamic bindings (issue here) which would address your scenario once that work is done. Basically we'll support the ability to imperatively create multiple output bindings in your code in Node.js, similar to the support we already have today for C# (detailed here).

Sign up to request clarification or add additional context in comments.

2 Comments

I guess I'll just use the storage module for now, thanks for the help!
3 years later, has this feature been implemented?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.