假如所在目录为download

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

 

相关文章:

  • 2022-01-25
  • 2021-12-16
  • 2022-12-23
  • 2022-03-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
猜你喜欢
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-05-01
相关资源
相似解决方案