Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging

# Conflicts:
#	src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs
#	src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs
#	src/Umbraco.Tests/Models/MediaXmlTest.cs
#	src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
This commit is contained in:
Mole
2020-09-23 13:32:49 +02:00
52 changed files with 136 additions and 102 deletions

View File

@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using Umbraco.Core.Configuration.Models;
using Umbraco.Core.Configuration.UmbracoSettings;
@@ -7,20 +6,6 @@ namespace Umbraco.Core.Configuration
{
public static class ContentSettingsExtensions
{
/// <summary>
/// Gets a value indicating whether the file extension corresponds to an image.
/// </summary>
/// <param name="extension">The file extension.</param>
/// <param name="contentConfig"></param>
/// <returns>A value indicating whether the file extension corresponds to an image.</returns>
public static bool IsImageFile(this ContentSettings contentConfig, string extension)
{
if (contentConfig == null) throw new ArgumentNullException(nameof(contentConfig));
if (extension == null) return false;
extension = extension.TrimStart('.');
return contentConfig.Imaging.ImageFileTypes.InvariantContains(extension);
}
/// <summary>
/// Determines if file extension is allowed for upload based on (optional) white list and black list
/// held in settings.