在 StartUp 中的 Configure 方法添加如下代码即可
app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = new FileExtensionContentTypeProvider() { Mappings = {[".exe"] = "application/octect-stream"} } });
原因是默认没有 exe 的 content-type。
在 StartUp 中的 Configure 方法添加如下代码即可
app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = new FileExtensionContentTypeProvider() { Mappings = {[".exe"] = "application/octect-stream"} } });
原因是默认没有 exe 的 content-type。
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。