Soukoku.Extensions.FileProviders.Zip
2.0.1
dotnet add package Soukoku.Extensions.FileProviders.Zip --version 2.0.1
NuGet\Install-Package Soukoku.Extensions.FileProviders.Zip -Version 2.0.1
<PackageReference Include="Soukoku.Extensions.FileProviders.Zip" Version="2.0.1" />
paket add Soukoku.Extensions.FileProviders.Zip --version 2.0.1
#r "nuget: Soukoku.Extensions.FileProviders.Zip, 2.0.1"
// Install Soukoku.Extensions.FileProviders.Zip as a Cake Addin #addin nuget:?package=Soukoku.Extensions.FileProviders.Zip&version=2.0.1 // Install Soukoku.Extensions.FileProviders.Zip as a Cake Tool #tool nuget:?package=Soukoku.Extensions.FileProviders.Zip&version=2.0.1
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 | 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 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
-
net6.0
-
net8.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.