Skip to content

Ensure collection support works for blob storage input bindings #1156

@liliankasem

Description

@liliankasem

With the introduction of deferred binding via using ParameterBindingData/ModelBindingData to enable SDK-type bindings such as BlobClient in the worker, we need to make sure we also support the collection scenario. Meaning, we should be able to bind to IEnumerable<BlobClient> blobs.

Example:

public static class BlobFunction_EnumerateBlobs_BlobClient
{
    [FunctionName("BlobFunction")]
    public static void Run(
        [BlobTrigger("sample-container/sample-blob")] Stream blobStream,
        [Blob("sample-container")] IEnumerable<BlobClient> blobs,
        ILogger logger)
    {
        logger.LogInformation("Blobs within container:");
        foreach (BlobClient blob in blobs)
        {
            logger.LogInformation(blob.Name);
        }
    }
}

Investigate if this works out of the box with the blob converter we have in place today. If this use case is not working, update the converter and other necessary code paths to enable this scenario

Notes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions