Dignite.Abp.FileStoring 10.0.0-rc.27

This is a prerelease version of Dignite.Abp.FileStoring.
dotnet add package Dignite.Abp.FileStoring --version 10.0.0-rc.27
                    
NuGet\Install-Package Dignite.Abp.FileStoring -Version 10.0.0-rc.27
                    
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="Dignite.Abp.FileStoring" Version="10.0.0-rc.27" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dignite.Abp.FileStoring" Version="10.0.0-rc.27" />
                    
Directory.Packages.props
<PackageReference Include="Dignite.Abp.FileStoring" />
                    
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 Dignite.Abp.FileStoring --version 10.0.0-rc.27
                    
#r "nuget: Dignite.Abp.FileStoring, 10.0.0-rc.27"
                    
#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 Dignite.Abp.FileStoring@10.0.0-rc.27
                    
#: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=Dignite.Abp.FileStoring&version=10.0.0-rc.27&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Dignite.Abp.FileStoring&version=10.0.0-rc.27&prerelease
                    
Install as a Cake Tool

Dignite Abp File Storing

Part of dignite-projects/abp-modules — see the repository README for the other modules, and CONTRIBUTING.md for the build, versioning, and release process shared across them. Formerly developed at dignite-projects/abp-file-storing; no package ID changed in the move.

A thin enhancement layer on ABP BlobStoring: per-container upload rules, and one service that applies them and stores the result.

  • core/src/Dignite.Abp.FileStoring — the IFileHandler pipeline (FileSizeLimitHandler, FileTypeCheckHandler), IFileStorer, content-based MIME detection.
  • core/src/Dignite.Abp.FileStoring.Imaging — ImageResizeHandler, an optional upload-time resize.

There is no metadata layer, API or UI here. An application keeps its own file records and authorization and uses IFileStorer to put bytes into a container. (File Explorer, the DDD file browser that used to ship from this folder, moved to the site repository as part of Site in 10.0.0-rc.25 — see docs/core-only-decision.md.)

Usage

Depend on DigniteAbpFileStoringModule (or DigniteAbpFileStoringImagingModule) and configure a container:

Configure<AbpBlobStoringOptions>(options =>
{
    options.Containers.Configure<AttachmentsContainer>(container =>
    {
        container.UseFileSystem(fs => fs.BasePath = "...");
        container.AddFileSizeLimitHandler(h => h.MaxFileSize = 20); // MB
        container.AddFileTypeCheckHandler(h => h.AllowedFileTypeNames = [".pdf", ".png", ".jpg"]);
    });
});

Store an upload:

var stored = await _fileStorer.StoreAsync<AttachmentsContainer>(file.FileName, file.GetStream(), cancellationToken);

try
{
    await _attachmentRepository.InsertAsync(
        new Attachment(GuidGenerator.Create(), ticketId, stored.BlobName, file.FileName, stored.MimeType, stored.Size, stored.Hash),
        autoSave: true,
        cancellationToken);
}
catch
{
    await _fileStorer.DeleteAsync<AttachmentsContainer>(stored.BlobName);
    throw;
}

What StoreAsync guarantees:

  • The size limit binds while reading. The upload is copied into a buffer that is never allowed past the container's AddFileSizeLimitHandler limit (100 MB, FileConsts.DefaultMaxFileSizeInBytes, when none is set). Still enforce a request-body limit at the HTTP layer.
  • The MIME type comes from the content. IMimeTypeDetector reads the file's signature; a file whose content contradicts its extension is rejected (Dignite.Abp.File:0005). The API does not accept a MIME type from the caller.
  • Handlers run in the configured order on the buffered content; StoredFileInfo describes what was stored after them (a resized image reports its resized size and hash).
  • No partial blobs. A save that fails after writing is followed by a delete of that blob. A name collision (BlobAlreadyExistsException, only possible with a custom IBlobNameGenerator) is never "compensated" by deleting the existing blob.

Dedup by content is up to you: compare StoredFileInfo.Hash (SHA-256, upper-case hex) with your own records.

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 (5)

Showing the top 5 NuGet packages that depend on Dignite.Abp.FileStoring:

Package Downloads
Dignite.FileExplorer.Domain.Shared

Package Description

Dignite.FileExplorer.Domain

Package Description

Dignite.FileExplorer.Application

Package Description

Dignite.FileExplorer.HttpApi

Package Description

Dignite.Abp.FileStoring.Imaging

Optional upload-time image processing for Dignite.Abp.FileStoring.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-rc.27 62 10/10/2026
10.0.0-rc.26 54 10/10/2026
10.0.0-rc.25 57 10/10/2026
10.0.0-rc.24 92 10/9/2026
10.0.0-rc.23 89 10/9/2026
10.0.0-rc.22 87 10/9/2026
10.0.0-rc.21 98 10/7/2026
10.0.0-rc.20 97 10/7/2026
10.0.0-rc.19 101 10/4/2026
10.0.0-rc.18 99 10/4/2026
10.0.0-rc.17 122 9/23/2026
10.0.0-rc.16 119 9/6/2026
10.0.0-rc.15 115 9/5/2026
10.0.0-rc.14 118 9/4/2026
10.0.0-rc.13 108 9/3/2026
10.0.0-rc.11 115 8/30/2026
10.0.0-rc.7 115 8/30/2026
10.0.0-rc.6 113 8/30/2026