diff --git a/src/Application/Entries/Commands/CreateEntry.cs b/src/Application/Entries/Commands/CreateEntry.cs index 3f485f18..4ad0c5e6 100644 --- a/src/Application/Entries/Commands/CreateEntry.cs +++ b/src/Application/Entries/Commands/CreateEntry.cs @@ -32,9 +32,9 @@ public Validator() RuleLevelCascadeMode = CascadeMode.Stop; RuleFor(x => x.FileExtension) - .Must(extension => + .Must((command, extension) => { - if (!_allowedExtensions.Contains(extension)) + if (!command.IsDirectory && !_allowedExtensions.Contains(extension)) { throw new ConflictException("This file is not supported."); }