Browse Source

Config for recursive deletion.

4_1 4.1.3
Sebastian 6 years ago
parent
commit
5c1a8939ef
  1. 7
      backend/src/Squidex/Config/Domain/AssetServices.cs
  2. 6
      backend/src/Squidex/appsettings.json

7
backend/src/Squidex/Config/Domain/AssetServices.cs

@ -28,8 +28,11 @@ namespace Squidex.Config.Domain
services.Configure<AssetOptions>(
config.GetSection("assets"));
services.AddTransientAs<RecursiveDeleter>()
.As<IEventConsumer>();
if (config.GetValue<bool>("assets:deleteRecursive"))
{
services.AddTransientAs<RecursiveDeleter>()
.As<IEventConsumer>();
}
services.AddTransientAs<AssetDomainObject>()
.AsSelf();

6
backend/src/Squidex/appsettings.json

@ -217,7 +217,11 @@
/*
* The maximum file size in bytes. Default: 5MB
*/
"maxSize": 5242880
"maxSize": 5242880,
/*
* True to delete assets recursively.
*/
"deleteRecursive": false
},
"logging": {

Loading…
Cancel
Save