Rask.Storage 0.23.1-alpha.0.45

This is a prerelease version of Rask.Storage.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Rask.Storage --version 0.23.1-alpha.0.45
                    
NuGet\Install-Package Rask.Storage -Version 0.23.1-alpha.0.45
                    
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="Rask.Storage" Version="0.23.1-alpha.0.45" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rask.Storage" Version="0.23.1-alpha.0.45" />
                    
Directory.Packages.props
<PackageReference Include="Rask.Storage" />
                    
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 Rask.Storage --version 0.23.1-alpha.0.45
                    
#r "nuget: Rask.Storage, 0.23.1-alpha.0.45"
                    
#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 Rask.Storage@0.23.1-alpha.0.45
                    
#: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=Rask.Storage&version=0.23.1-alpha.0.45&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rask.Storage&version=0.23.1-alpha.0.45&prerelease
                    
Install as a Cake Tool

Rask.Storage

Keep the files your users upload — on a directory on the deploy volume by default, or in S3-compatible storage or Azure Blob Storage by configuration — with a row per file on your application's own database.

builder.Services.AddRaskStorage<AppDbContext>();
// OnModelCreating: modelBuilder.AddRaskStorage();
// after app.UseRask<App>(): app.MapRaskStorage();
public sealed class SetCover(IFiles files)
{
    public async Task HandleAsync(Post post, RaskFile upload, CancellationToken ct)
    {
        var file = await files.SaveAsync(upload.OpenReadStream, upload.Name, upload.Size, o => o.Public = true, ct);
        post.CoverId = file.Id;
    }
}

Img.Src(files.Url(post.CoverId));                                    // a public file
await files.TemporaryUrlAsync(invoice.FileId, TimeSpan.FromMinutes(5)); // a private one, expiring
app.MapGet("/invoices/{id}", (Guid id, IFiles files) => files.Download(id)); // behind your own check
  • Content types are sniffed from the bytes, never taken from the browser. Only images, audio and video are served inline; everything else — SVG and HTML included — downloads as an attachment.
  • Uploads are capped at 50 MB by default (MaxFileSize), and AllowedTypes narrows what is accepted.
  • Orphaned bytes are swept: a file whose row was never written is removed after a grace period.
  • A file belongs to the tenant that saved it in a multi-tenant app: finding, opening, linking and deleting it by id are scoped to the tenant in flight, so another tenant holding the id cannot reach it. StoredFile.Read lists uploads with no context of your own.

Included in the Rask package and on by default. See the file storage guide.

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Rask.Storage:

Package Downloads
Rask.Dashboard

A built-in operator dashboard for the Rask One Person Framework batteries. Mounts at /_rask and shows the outbox, background jobs, queued mail, cache and stored files from the application's own database — queue depth, dead letters, the errors behind them, stored email previews, the recurring-job schedule, SQLite pragmas and backup status. A live log tail is built in, and becomes a searchable history when Rask.Logging is installed. Panels appear only for the batteries the app actually registered. Protected by an authorization policy that fails closed outside Development.

Rask

The one reference a Rask application needs, server or browser. On a server target (net10.0 or net11.0) it brings the ASP.NET host plus every battery — database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, and SQLite snapshots and continuous backup — with RaskApp.Create(args) as the entry point. On a browser target it brings the WebAssembly host, the source-generated mediator, the query cache and remote dispatch. Everything referenced is wired and on; app.Configure(c => c.Jobs.Off()) is how an app does without one. Reference Rask.Server for a lean host with no database.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.23.1-alpha.0.46 0 9/23/2026
0.23.1-alpha.0.45 0 9/23/2026
0.23.1-alpha.0.43 0 9/23/2026
0.23.1-alpha.0.38 0 9/23/2026
0.23.1-alpha.0.36 0 9/23/2026
0.23.1-alpha.0.35 4 9/23/2026
0.23.1-alpha.0.34 5 9/23/2026
0.23.1-alpha.0.33 45 9/21/2026
0.23.1-alpha.0.30 42 9/21/2026
0.23.1-alpha.0.29 44 9/21/2026
0.23.1-alpha.0.28 54 9/21/2026
0.23.1-alpha.0.27 45 9/21/2026
0.23.1-alpha.0.26 44 9/21/2026
0.23.1-alpha.0.24 44 9/21/2026
0.23.1-alpha.0.23 50 9/21/2026
0.23.1-alpha.0.22 41 9/21/2026
0.23.1-alpha.0.21 43 9/21/2026
0.23.1-alpha.0.20 46 9/21/2026
0.23.1-alpha.0.18 56 9/21/2026
0.23.0 93 9/18/2026
Loading failed