李昊 4 years ago
parent
commit
81579e7955
1 changed files with 2 additions and 1 deletions
  1. 2 1
      gx_api/GxPress/Api/GxPress.Api/Startup.cs

+ 2 - 1
gx_api/GxPress/Api/GxPress.Api/Startup.cs

@@ -127,7 +127,8 @@ namespace GxPress.Api
             {
                 FileProvider = new PhysicalFileProvider(
             Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")),
-                RequestPath = "/MyImages"
+                RequestPath = "/MyImages",
+                ContentTypeProvider = provider
             });
             app.UseDirectoryBrowser(new DirectoryBrowserOptions
             {