Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Change the lifetime of the services IMediaFileStore

KrzysztofPajak1338718c82be
diff --git a/src/Business/Grand.Business.Storage/Startup/StartupApplication.cs b/src/Business/Grand.Business.Storage/Startup/StartupApplication.cs
index 13342c562..31d2cc297 100644
--- a/src/Business/Grand.Business.Storage/Startup/StartupApplication.cs
+++ b/src/Business/Grand.Business.Storage/Startup/StartupApplication.cs
@@ -40,7 +40,7 @@ namespace Grand.Business.Storage.Startup
services.AddScoped<IPictureService, PictureService>();
}
- services.AddSingleton<IMediaFileStore>(serviceProvider =>
+ services.AddScoped<IMediaFileStore>(serviceProvider =>
{
var fileStore = new FileSystemStore(CommonPath.WebRootPath);
return new DefaultMediaFileStore(fileStore);