Skip to content

FEATURE: Support multiple containers for FileStorage.Azure #53

Description

@andriikaplanovskyi

Support multiple containers for FileStorage.Azure

Detailed Description

At this moment when using FileStorage.Azure we configure the container in AzureBaseStorageOptions

public string? ContainerName { get; init; }

This is not very convenient as all files will be stored into this container and there is no possibility to create multiple IFileStorage abstractions with different containers configured to store blobs.

It would be more convenient if we could specify the container name manually when saving / retrieving a file, something like:

public interface IBlobCloudStorage
{
    Task<FileRecord> UploadBlobAsync(
        string containerName, <--------------
        string fileName,
        Stream fileContent,
        string fileContentType,
        CancellationToken cancellationToken = default);

    Task<Stream> DownloadBlobAsync(
        string containerName, <--------------
        string fileName,
        CancellationToken cancellationToken = default);

    Task UploadJsonAsync(
        string containerName, <--------------
        string blobName,
        string jsonContent,
        bool overrideExistingBlob,
        CancellationToken cancellationToken = default);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions