NFinal.Middleware.UnZip 1.0.11-rc1

http middleware for zip file.support nfinal mvc,asp.net mvc and .net core

This is a prerelease version of NFinal.Middleware.UnZip.
Install-Package NFinal.Middleware.UnZip -Version 1.0.11-rc1
dotnet add package NFinal.Middleware.UnZip --version 1.0.11-rc1
<PackageReference Include="NFinal.Middleware.UnZip" Version="1.0.11-rc1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NFinal.Middleware.UnZip --version 1.0.11-rc1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NFinal.Middleware.UnZip

把静态资源文件放入zip压缩包中的Http中间件项目,支持NFinal,Asp.net mvc以及.net core.

.net framework下使用

public void Configuration(IAppBuilder appBuilder)
{
    string unZipFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Static","Index.zip");
    FileStream fileStream = new FileStream(unZipFileName, FileMode.Open, FileAccess.Read);
    var config = new NFinal.Middleware.UnZip.UnZipConfig()
    {
        unZipArray = new[] { new NFinal.Middleware.UnZip.UnZip() {
            zipFileStream=fileStream
        } },
        defaultUrl = "/Index.html"
    };
    appBuilder.Use<NFinal.Middleware.UnZip.OwinUnZipMiddleware>(config);
}

.net core及.net standard下使用

public void Configure(IApplicationBuilder app)
{
    string unZipFileName = Path.Combine(AppContext.BaseDirectory, "Static", "Index.zip");
    FileStream fileStream = new FileStream(unZipFileName, FileMode.Open, FileAccess.Read);
    var config = new NFinal.Middleware.UnZip.UnZipConfig()
    {
        unZipArray = new[] { new NFinal.Middleware.UnZip.UnZip() {
            zipFileStream=fileStream
        } },
        defaultUrl = "/Index.html"
    };
    app.UseMiddleware<NFinal.Middleware.UnZip.CoreUnZipMiddleware>(config);
}

NFinal.Middleware.UnZip

把静态资源文件放入zip压缩包中的Http中间件项目,支持NFinal,Asp.net mvc以及.net core.

.net framework下使用

public void Configuration(IAppBuilder appBuilder)
{
    string unZipFileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Static","Index.zip");
    FileStream fileStream = new FileStream(unZipFileName, FileMode.Open, FileAccess.Read);
    var config = new NFinal.Middleware.UnZip.UnZipConfig()
    {
        unZipArray = new[] { new NFinal.Middleware.UnZip.UnZip() {
            zipFileStream=fileStream
        } },
        defaultUrl = "/Index.html"
    };
    appBuilder.Use<NFinal.Middleware.UnZip.OwinUnZipMiddleware>(config);
}

.net core及.net standard下使用

public void Configure(IApplicationBuilder app)
{
    string unZipFileName = Path.Combine(AppContext.BaseDirectory, "Static", "Index.zip");
    FileStream fileStream = new FileStream(unZipFileName, FileMode.Open, FileAccess.Read);
    var config = new NFinal.Middleware.UnZip.UnZipConfig()
    {
        unZipArray = new[] { new NFinal.Middleware.UnZip.UnZip() {
            zipFileStream=fileStream
        } },
        defaultUrl = "/Index.html"
    };
    app.UseMiddleware<NFinal.Middleware.UnZip.CoreUnZipMiddleware>(config);
}

Release Notes

Lucas created

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.11-rc1 260 1/29/2018