.netCore下载xls 设置

假如所在目录为download

app.UseHttpsRedirection();
app.UseStaticFiles(new StaticFileOptions()
{
    FileProvider = new PhysicalFileProvider(
    Path.Combine(Directory.GetCurrentDirectory(), @"download")),
    RequestPath = new PathString("/download")
});
app.UseRouting();

 

posted @ 2020-05-06 19:21  zhaogaojian  阅读(407)  评论(0编辑  收藏  举报