李昊 4 rokov pred
rodič
commit
e36469f8e6
1 zmenil súbory, kde vykonal 6 pridanie a 0 odobranie
  1. 6 0
      gx_api/GxPress/Api/GxPress.Api/Startup.cs

+ 6 - 0
gx_api/GxPress/Api/GxPress.Api/Startup.cs

@@ -124,6 +124,12 @@ namespace GxPress.Api
             Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")),
                 RequestPath = "/MyImages"
             });
+            app.UseDirectoryBrowser(new DirectoryBrowserOptions
+            {
+                FileProvider = new PhysicalFileProvider(
+            Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")),
+                RequestPath = "/MyImages"
+            });
             app.UseCors("AllowAny");
             app.UseSwashbuckle();