I want to have access to two folders of my static files. One is wwwroot, and the other is Uploads, which is on the server.
How can I achieve this?


I have tested the following scenarios:
app.UseBlazorFrameworkFiles(); string rootpath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "wwwroot"); string rootpath2 = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot"); app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(rootpath2), RequestPath = "/wwwroot" }); app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider( Path.Combine(Directory.GetCurrentDirectory(), "Uploads")), RequestPath = "/Uploads" }); However, I don't have access to the wwwroot directory. The only scenario where I can access wwwroot is when I write the following code:
app.UseStaticFiles(); But in this case, I don't have access to the Uploads folder.
Источник: https://stackoverflow.com/questions/780 ... -in-blazor
Мобильная версия