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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Refactor path properties in CommonPath and ElFinderViewModel
KrzysztofPajakab0f8b5bd514
diff --git a/src/Core/Grand.SharedKernel/Extensions/CommonPath.cs b/src/Core/Grand.SharedKernel/Extensions/CommonPath.csindex 60a7a4327..82a976a85 100644--- a/src/Core/Grand.SharedKernel/Extensions/CommonPath.cs+++ b/src/Core/Grand.SharedKernel/Extensions/CommonPath.cs@@ -20,14 +20,7 @@ public static class CommonPath/// </summary>/// <returns>The physical path.</returns>public static string PluginsPath => Path.Combine(BaseDirectory, "Plugins");-- /// <summary>- /// Maps a image upload path.- /// </summary>- /// <returns>The path.</returns>- public static string ImageUploadedPath => Path.Combine("assets", "images", "uploaded");--+/// <summary>/// Maps a installled plugins path to a physical disk path./// </summary>diff --git a/src/Web/Grand.Web.Admin/Services/ElFinderViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ElFinderViewModelService.csindex 6beba6d98..de0520367 100644--- a/src/Web/Grand.Web.Admin/Services/ElFinderViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Services/ElFinderViewModelService.cs@@ -26,6 +26,7 @@ public class ElFinderViewModelService : IElFinderViewModelServiceprivate readonly string _urlThumb;private static string ImageThumbPath => Path.Combine("assets", "images", "thumbs");+ private static string ImageUploadedPath => Path.Combine("assets", "images", "uploaded");public ElFinderViewModelService(IDriver driver,@@ -50,11 +51,11 @@ public class ElFinderViewModelService : IElFinderViewModelService_connector.Options.DisabledUICommands = _mediaSettings.FileManagerDisabledUICommands.Split(',').Select(x => x.Trim()).ToList();- var uploaded = _mediaFileStore.GetDirectoryInfo(CommonPath.ImageUploadedPath);+ var uploaded = _mediaFileStore.GetDirectoryInfo(ImageUploadedPath);if (uploaded == null){- _mediaFileStore.TryCreateDirectory(CommonPath.ImageUploadedPath);- uploaded = _mediaFileStore.GetDirectoryInfo(CommonPath.ImageUploadedPath);+ _mediaFileStore.TryCreateDirectory(ImageUploadedPath);+ uploaded = _mediaFileStore.GetDirectoryInfo(ImageUploadedPath);}_fullPathToUpload = uploaded.PhysicalPath;