ProNotion
01/20/2025, 4:30 PMpublic void Compose(IUmbracoBuilder builder)
{
builder.SetMediaFileSystem(factory =>
{
var webHostingEnvironment = factory.GetRequiredService<IWebHostEnvironment>();
var hostingEnvironment = factory.GetRequiredService<IHostingEnvironment>();
var ioHelper = factory.GetRequiredService<IIOHelper>();
var logger = factory.GetRequiredService<ILogger<PhysicalFileSystem>>();
// Define the folder location and URL
var rootPath = webHostingEnvironment.MapPathWebRoot("~/media");
var rootUrl = hostingEnvironment.ToAbsolute("~/assets"); // Use /assets instead of /media
return new PhysicalFileSystem(ioHelper, hostingEnvironment, logger, rootPath, rootUrl);
});
}
ProNotion
01/20/2025, 4:51 PMUmbracoMediaPath
in appsettings and that also does not appear to be applying the expected result.