From a96f48d0a8b02e7558ebfdee938af3226ea2a59b Mon Sep 17 00:00:00 2001 From: Claus Date: Fri, 4 Nov 2016 13:52:36 +0100 Subject: [PATCH] changing media controller logic. --- src/Umbraco.Web/Editors/MediaController.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index 41551d099d..932b3f6766 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -531,17 +531,17 @@ namespace Umbraco.Web.Editors { var mediaType = Constants.Conventions.MediaTypes.File; - if (UmbracoConfig.For.UmbracoSettings().Content.ImageFileTypes.Contains(ext)) + if (result.FormData["contentTypeAlias"] == Constants.Conventions.MediaTypes.Image) { - if (result.FormData.ContainsKey("contentTypeAlias")) - { - mediaType = result.FormData["contentTypeAlias"]; - } - else + if (UmbracoConfig.For.UmbracoSettings().Content.ImageFileTypes.Contains(ext)) { mediaType = Constants.Conventions.MediaTypes.Image; } } + else + { + mediaType = result.FormData["contentTypeAlias"]; + } //TODO: make the media item name "nice" since file names could be pretty ugly, we have // string extensions to do much of this but we'll need: