在 StartUp 中的 Configure 方法添加如下代码即可
app.UseStaticFiles(new StaticFileOptions()
{
ContentTypeProvider = new FileExtensionContentTypeProvider()
{
Mappings = {[".exe"] = "application/octect-stream"}
}
});
原因是默认没有 exe 的 content-type。
2023-08-27 23:34:34
在 StartUp 中的 Configure 方法添加如下代码即可
app.UseStaticFiles(new StaticFileOptions()
{
ContentTypeProvider = new FileExtensionContentTypeProvider()
{
Mappings = {[".exe"] = "application/octect-stream"}
}
});
原因是默认没有 exe 的 content-type。
下一篇:jquery 判断元素是否可见