Reverse boolean check, to not fail if valid (#16153)

This commit is contained in:
Nikolaj Geisle
2024-04-26 08:29:50 +02:00
committed by GitHub
parent e1692f867f
commit fcbfecd28e

View File

@@ -56,7 +56,7 @@ internal class TemporaryFileUploadValidator : IValueValidator
}
ContentSettings contentSettings = _getContentSettings();
if (contentSettings.IsFileAllowedForUpload(extension) || (_validateFileType != null && _validateFileType(extension, dataTypeConfiguration) == false))
if (contentSettings.IsFileAllowedForUpload(extension) is false || (_validateFileType != null && _validateFileType(extension, dataTypeConfiguration) == false))
{
yield return new ValidationResult(
$"The file type for file name \"{temporaryFile.FileName}\" is not valid for upload",