From e99ea383005b5d876aecf4dedec147b262db35b3 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 23 Sep 2020 16:28:56 +0800 Subject: [PATCH] Obsolete the FileUploadLocalFolder --- .../app/Volo.BloggingTestApp/BloggingTestAppModule.cs | 5 ----- .../Volo/Blogging/Files/BlogFileOptions.cs | 5 ++++- .../Volo/Blogging/Files/FileAppService.cs | 3 --- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 4f04b56d0b..600cc05f84 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -132,11 +132,6 @@ namespace Volo.BloggingTestApp options.DefaultThemeName = BasicTheme.Name; }); - Configure(options => - { - options.FileUploadLocalFolder = Path.Combine(hostingEnvironment.WebRootPath, "files"); - }); - Configure(options => { options.Containers.ConfigureDefault(container => diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/BlogFileOptions.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/BlogFileOptions.cs index 7243595802..3096341fa2 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/BlogFileOptions.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/BlogFileOptions.cs @@ -1,4 +1,6 @@ -namespace Volo.Blogging.Files +using System; + +namespace Volo.Blogging.Files { /* TODO: * - It is not to have different options for all different modules. We should find a more generic way. @@ -6,6 +8,7 @@ */ public class BlogFileOptions { + [Obsolete("Now store using blob storing system, will be deleted in a next version")] public string FileUploadLocalFolder { get; set; } } } diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs index 831b6d53a8..8fdd12858d 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs @@ -13,14 +13,11 @@ namespace Volo.Blogging.Files public class FileAppService : BloggingAppServiceBase, IFileAppService { protected IBlobContainer BlobContainer { get; } - public BlogFileOptions Options { get; } public FileAppService( - IOptions options, IBlobContainer blobContainer) { BlobContainer = blobContainer; - Options = options.Value; } public virtual async Task GetAsync(string name)