var provider = new FileExtensionContentTypeProvider();
provider.Mappings.Add(".apk", "application/vnd.android.package-archive");
app.UseStaticFiles(new StaticFileOptions
{
ContentTypeProvider = provider,
FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(System.IO.Directory.GetCurrentDirectory() + @"/App"),
RequestPath = $ "/项目名称/App" // 存放APP的文件夹
});
2)点击MIME类型,点击添加
文件扩展名:.apk MIME类型:application/vnd.android.package-archive
注意:app的文件要设置属性为:始终复制