diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs index 497372a944..475f8f1f0e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs @@ -83,13 +83,16 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency version = latestVersion; } - var nugetVersion = (await GetTemplateNugetVersionAsync(name, type, version)) ?? version; + if (await GetTemplateNugetVersionAsync(name, type, version) == null) + { + throw new Exception("There is no version found with given version: " + version); + } if (!string.IsNullOrWhiteSpace(templateSource) && !IsNetworkSource(templateSource)) { Logger.LogInformation("Using local " + type + ": " + name + ", version: " + version); return new TemplateFile(File.ReadAllBytes(Path.Combine(templateSource, name + "-" + version + ".zip")), - version, latestVersion, nugetVersion); + version, latestVersion, version); } var localCacheFile = Path.Combine(CliPaths.TemplateCache, name.Replace("/", ".") + "-" + version + ".zip"); @@ -97,14 +100,14 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency #if DEBUG if (File.Exists(localCacheFile)) { - return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion); + return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, version); } #endif if (Options.CacheTemplates && File.Exists(localCacheFile) && templateSource.IsNullOrWhiteSpace()) { Logger.LogInformation("Using cached " + type + ": " + name + ", version: " + version); - return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion); + return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, version); } Logger.LogInformation("Downloading " + type + ": " + name + ", version: " + version); @@ -125,7 +128,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency File.WriteAllBytes(localCacheFile, fileContent); } - return new TemplateFile(fileContent, version, latestVersion, nugetVersion); + return new TemplateFile(fileContent, version, latestVersion, version); } private async Task GetLatestSourceCodeVersionAsync(string name, string type, string url = null, @@ -141,7 +144,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency var client = _cliHttpClientFactory.CreateClient(); var stringContent = new StringContent( JsonSerializer.Serialize(new GetLatestSourceCodeVersionDto - { Name = name, IncludePreReleases = includePreReleases }), + {Name = name, IncludePreReleases = includePreReleases}), Encoding.UTF8, MimeTypes.Application.Json ); @@ -174,7 +177,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency var client = _cliHttpClientFactory.CreateClient(); var stringContent = new StringContent( - JsonSerializer.Serialize(new GetTemplateNugetVersionDto { Name = name, Version = version }), + JsonSerializer.Serialize(new GetTemplateNugetVersionDto {Name = name, Version = version}), Encoding.UTF8, MimeTypes.Application.Json ); diff --git a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs index 3e44b651ec..3a80ce21d0 100644 --- a/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs +++ b/modules/blogging/src/Volo.Blogging.Web/BloggingWebModule.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; @@ -11,6 +12,7 @@ using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; using Volo.Blogging.Bundling; +using Volo.Blogging.Files; using Volo.Blogging.Localization; namespace Volo.Blogging @@ -78,6 +80,11 @@ namespace Volo.Blogging { options.DisableModule(BloggingRemoteServiceConsts.ModuleName); }); + + Configure(options => + { + options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(FileUploadInputDto)); + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs index 96773235eb..63806d142c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AspNetCore.Mvc; using Volo.CmsKit.Admin.Web.Menus; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.Modularity; @@ -12,6 +13,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.PageToolbars; using Volo.Abp.Localization; using Volo.Abp.AutoMapper; using Volo.Abp.Http.ProxyScripting.Generators.JQuery; +using Volo.CmsKit.Admin.MediaDescriptors; namespace Volo.CmsKit.Admin.Web; @@ -158,5 +160,10 @@ public class CmsKitAdminWebModule : AbpModule { options.DisableModule(CmsKitAdminRemoteServiceConsts.ModuleName); }); + + Configure(options => + { + options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(CreateMediaInputWithStream)); + }); } }