TempFileStorage.SqlServer 4.0.0-alpha2

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

TempFileStorage

Easy .NET standard library for handling file-uploads

Just use ITempFileStorage to store your file during uploads, this will return a key for later use, for when you want to save your form.

Core package comes with In-Memory storage that is usefull for testing or non-multi server setups.

Installing TempFileStorage

You should install TempFileStorage with NuGet:

Install-Package TempFileStorage

Or via the .NET Core command line interface:

dotnet add package TempFileStorage

Usage

Add the following service to the container:

services.AddSingleton<ITempFileStorage, TempFileMemoryStorage>();

Register the Middleware in your Startup.cs to activate the request-middleware:

app.UseEndpoints(endpoints =>
{
    endpoints.MapTempFileStorage(
        downloadPattern: "/download-file",
        uploadPattern: "/upload-file"
    );
});

SqlServer

Install the package TempFileStorage.SqlServer with NuGet:

Run the SQL-script install.sql on your DB-server.

Swap the TempFileMemoryStorage with TempFileSqlStorage

services.AddSingleton<ITempFileStorage>(c => new TempFileSqlStorage(Configuration.GetConnectionString("Database")));
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
4.0.0-alpha2 188 5/11/2025
3.2.0 308 11/7/2024
3.1.2 343 1/31/2024
3.1.1 1,979 1/9/2023
3.1.0 670 9/21/2022
3.0.0 1,895 6/17/2021