Eaf.BlobStoring 9.4.6

Prefix Reserved
dotnet add package Eaf.BlobStoring --version 9.4.6
                    
NuGet\Install-Package Eaf.BlobStoring -Version 9.4.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Eaf.BlobStoring" Version="9.4.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eaf.BlobStoring" Version="9.4.6" />
                    
Directory.Packages.props
<PackageReference Include="Eaf.BlobStoring" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Eaf.BlobStoring --version 9.4.6
                    
#r "nuget: Eaf.BlobStoring, 9.4.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Eaf.BlobStoring@9.4.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Eaf.BlobStoring&version=9.4.6
                    
Install as a Cake Addin
#tool nuget:?package=Eaf.BlobStoring&version=9.4.6
                    
Install as a Cake Tool

Eaf.BlobStoring

Módulo de armazenamento de BLOBs do Enterprise Application Foundation (EAF).

Este módulo implementa provedores de armazenamento de BLOBs compatíveis com a API IBlobContainer / IBlobContainerFactory do ASP.NET Boilerplate (ABP), oferecendo suporte nativo a FileSystem, Azure Blob Storage e AWS S3 (ou serviços compatíveis com S3).

Provedores suportados

  • FileSystemBlobProvider: salva os BLOBs em disco, com isolamento por tenant e proteção contra path traversal.
  • AzureBlobProvider: salva os BLOBs no Azure Blob Storage, utilizando o SDK Azure.Storage.Blobs.
  • AwsS3BlobClient: salva os BLOBs no AWS S3, utilizando o SDK AWSSDK.S3.
  • EafCloudBlobProvider: provedor genérico de nuvem que seleciona automaticamente entre Azure e AWS de acordo com a configuração CloudProvider.

Configuração

[DependsOn(typeof(EafBlobStoringModule))]
public class MeuModulo : AbpModule
{
    public override void PreInitialize()
    {
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(FileSystemBlobProvider);
        Configuration.Modules.EafBlobStoring().FileSystemBasePath = @"C:\EAF\Blobs";

        // Ou para Azure:
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(AzureBlobProvider);
        Configuration.Modules.EafBlobStoring().AzureConnectionString = "UseDevelopmentStorage=true";
        Configuration.Modules.EafBlobStoring().AzureContainerName = "eaf-blobs";
        Configuration.Modules.EafBlobStoring().AzureCreateContainerIfNotExists = true;

        // Ou para AWS S3:
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(EafCloudBlobProvider);
        Configuration.Modules.EafBlobStoring().CloudProvider = "Aws";
        Configuration.Modules.EafBlobStoring().AwsAccessKeyId = "AKIA...";
        Configuration.Modules.EafBlobStoring().AwsSecretAccessKey = "...";
        Configuration.Modules.EafBlobStoring().AwsRegion = "us-east-1";
        Configuration.Modules.EafBlobStoring().AwsBucketName = "eaf-blobs";
        Configuration.Modules.EafBlobStoring().AwsCreateBucketIfNotExists = true;

        // Ou para MinIO / LocalStack (S3-compatível):
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(EafCloudBlobProvider);
        Configuration.Modules.EafBlobStoring().CloudProvider = "Aws";
        Configuration.Modules.EafBlobStoring().AwsServiceUrl = "http://localhost:9000";
        Configuration.Modules.EafBlobStoring().AwsForcePathStyle = true;
        Configuration.Modules.EafBlobStoring().AwsAccessKeyId = "minioadmin";
        Configuration.Modules.EafBlobStoring().AwsSecretAccessKey = "minioadmin";
        Configuration.Modules.EafBlobStoring().AwsBucketName = "eaf-blobs";
    }
}

Atenção: nunca armazene credenciais no código-fonte. Prefira variáveis de ambiente, AWS IAM roles ou gerenciadores de secrets como o Eaf.KeyVault.

Uso

public class MinhaAppService : IApplicationService
{
    private readonly IBlobContainer _blobContainer;

    public MinhaAppService(IBlobContainer blobContainer)
    {
        _blobContainer = blobContainer;
    }

    public async Task SalvarAsync(string nome, byte[] bytes)
    {
        await _blobContainer.SaveAsync(nome, bytes);
    }
}

Eaf.BlobStoring

Blob storage module for the Enterprise Application Foundation (EAF).

This module implements BLOB storage providers compatible with the ASP.NET Boilerplate (ABP) IBlobContainer / IBlobContainerFactory API, with built-in support for FileSystem, Azure Blob Storage and AWS S3 (or S3-compatible services).

Supported providers

  • FileSystemBlobProvider: stores BLOBs on disk, with tenant isolation and path traversal protection.
  • AzureBlobProvider: stores BLOBs in Azure Blob Storage using the Azure.Storage.Blobs SDK.
  • AwsS3BlobClient: stores BLOBs in AWS S3 using the AWSSDK.S3 SDK.
  • EafCloudBlobProvider: generic cloud provider that automatically selects Azure or AWS based on the CloudProvider configuration.

Configuration

[DependsOn(typeof(EafBlobStoringModule))]
public class MyModule : AbpModule
{
    public override void PreInitialize()
    {
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(FileSystemBlobProvider);
        Configuration.Modules.EafBlobStoring().FileSystemBasePath = @"C:\EAF\Blobs";

        // Or for Azure:
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(AzureBlobProvider);
        Configuration.Modules.EafBlobStoring().AzureConnectionString = "UseDevelopmentStorage=true";
        Configuration.Modules.EafBlobStoring().AzureContainerName = "eaf-blobs";
        Configuration.Modules.EafBlobStoring().AzureCreateContainerIfNotExists = true;

        // Or for AWS S3:
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(EafCloudBlobProvider);
        Configuration.Modules.EafBlobStoring().CloudProvider = "Aws";
        Configuration.Modules.EafBlobStoring().AwsAccessKeyId = "AKIA...";
        Configuration.Modules.EafBlobStoring().AwsSecretAccessKey = "...";
        Configuration.Modules.EafBlobStoring().AwsRegion = "us-east-1";
        Configuration.Modules.EafBlobStoring().AwsBucketName = "eaf-blobs";
        Configuration.Modules.EafBlobStoring().AwsCreateBucketIfNotExists = true;

        // Or for MinIO / LocalStack (S3-compatible):
        Configuration.Modules.EafBlobStoring().DefaultProvider = typeof(EafCloudBlobProvider);
        Configuration.Modules.EafBlobStoring().CloudProvider = "Aws";
        Configuration.Modules.EafBlobStoring().AwsServiceUrl = "http://localhost:9000";
        Configuration.Modules.EafBlobStoring().AwsForcePathStyle = true;
        Configuration.Modules.EafBlobStoring().AwsAccessKeyId = "minioadmin";
        Configuration.Modules.EafBlobStoring().AwsSecretAccessKey = "minioadmin";
        Configuration.Modules.EafBlobStoring().AwsBucketName = "eaf-blobs";
    }
}

Warning: never store credentials in source code. Prefer environment variables, AWS IAM roles or secret managers such as Eaf.KeyVault.

Usage

public class MyAppService : IApplicationService
{
    private readonly IBlobContainer _blobContainer;

    public MyAppService(IBlobContainer blobContainer)
    {
        _blobContainer = blobContainer;
    }

    public async Task SaveAsync(string name, byte[] bytes)
    {
        await _blobContainer.SaveAsync(name, bytes);
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.4.6 46 8/18/2026