1.简单的允许某mime类型下载
Startup.cs文件中Configure()添加
app.UseStaticFiles(new StaticFileOptions {
ContentTypeProvider=new FileExtensionContentTypeProvider(new Dictionary<string, string> {
{
".apk","application/vnd.android.package-archive"
},
{
//其它它类型
}
})
});