TempFileStorage.SqlServer
3.1.2
dotnet add package TempFileStorage.SqlServer --version 3.1.2
NuGet\Install-Package TempFileStorage.SqlServer -Version 3.1.2
<PackageReference Include="TempFileStorage.SqlServer" Version="3.1.2" />
paket add TempFileStorage.SqlServer --version 3.1.2
#r "nuget: TempFileStorage.SqlServer, 3.1.2"
// Install TempFileStorage.SqlServer as a Cake Addin #addin nuget:?package=TempFileStorage.SqlServer&version=3.1.2 // Install TempFileStorage.SqlServer as a Cake Tool #tool nuget:?package=TempFileStorage.SqlServer&version=3.1.2
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.Data.SqlClient (>= 3.1.5)
- TempFileStorage (>= 3.1.2)
-
net6.0
- Microsoft.Data.SqlClient (>= 3.1.5)
- TempFileStorage (>= 3.1.2)
-
net8.0
- Microsoft.Data.SqlClient (>= 3.1.5)
- TempFileStorage (>= 3.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.