diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Drivers/MediaFieldDisplayDriver.cs b/src/OrchardCore.Modules/OrchardCore.Media/Drivers/MediaFieldDisplayDriver.cs index 6776c5eebf1..43feb435164 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Drivers/MediaFieldDisplayDriver.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Drivers/MediaFieldDisplayDriver.cs @@ -118,7 +118,7 @@ public override async Task UpdateAsync(MediaField field, UpdateF { var extension = Path.GetExtension(field.Paths[i]); - if (!settings.AllowedExtensions.Contains(extension)) + if (!settings.AllowedExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase)) { context.Updater.ModelState.AddModelError(Prefix, nameof(model.Paths), S["Media extension is not allowed. Only media with '{0}' extensions are allowed.", string.Join(", ", settings.AllowedExtensions)]); }