Soukoku.Extensions.FileProviders.Zip
2.0.3
dotnet add package Soukoku.Extensions.FileProviders.Zip --version 2.0.3
NuGet\Install-Package Soukoku.Extensions.FileProviders.Zip -Version 2.0.3
<PackageReference Include="Soukoku.Extensions.FileProviders.Zip" Version="2.0.3" />
<PackageVersion Include="Soukoku.Extensions.FileProviders.Zip" Version="2.0.3" />
<PackageReference Include="Soukoku.Extensions.FileProviders.Zip" />
paket add Soukoku.Extensions.FileProviders.Zip --version 2.0.3
#r "nuget: Soukoku.Extensions.FileProviders.Zip, 2.0.3"
#:package Soukoku.Extensions.FileProviders.Zip@2.0.3
#addin nuget:?package=Soukoku.Extensions.FileProviders.Zip&version=2.0.3
#tool nuget:?package=Soukoku.Extensions.FileProviders.Zip&version=2.0.3
About
Allows using zip files as a FS provider for aspnet core's StaticFiles middleware. A single zip file can serve as a root file system when used this way.
Getting It
In an asp.net core project, install the Soukoku.Extensions.FileProviders.Zip NuGet package.
Example
Assuming there's a zip file you want to load, you can do something like the following
// inside the Program.cs or Startup.cs
IApplicationBuilder app = ...
var zipProvider = new ZipFileProvider(@"path\to\my\zip-file.zip");
var options = new FileServerOptions
{
FileProvider = provider,
RequestPath = "/test", // optional
EnableDirectoryBrowsing = true,
};
// required for extension-less files
options.StaticFileOptions.ServeUnknownFileTypes = true;
app.UseFileServer(options);
Then go to the url http://mysite/test in the browser to see the zip file content.
Sample Site
A sample asp.net core site is included in the solution that uses an old
PDF.js dist zip file.
Run it or look at the Startup.cs file to see how it's configured.
| Product | Versions 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 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. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
-
net10.0
- Microsoft.Extensions.FileProviders.Abstractions (>= 10.0.0)
-
net8.0
-
net9.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.