diff --git a/src/Umbraco.Web/Editors/ContentControllerBase.cs b/src/Umbraco.Web/Editors/ContentControllerBase.cs index fc112693e4..6b8d570e5f 100644 --- a/src/Umbraco.Web/Editors/ContentControllerBase.cs +++ b/src/Umbraco.Web/Editors/ContentControllerBase.cs @@ -99,23 +99,15 @@ namespace Umbraco.Web.Editors var files = contentItem.UploadedFiles.Where(x => x.PropertyAlias == property.Alias).ToArray(); if (files.Length > 0) { - dictionary.Add("files", files); - // add extra things needed to figure out where to put the files - dictionary.Add("cuid", contentItem.PersistedContent.Key); - dictionary.Add("puid", dboProperty.PropertyType.Key); + dictionary.Add("files", files); } - foreach (var file in files) file.FileName = file.FileName.ToSafeFileName(); - if (files.Length > 0) - { - dictionary.Add("files", files); - // add extra things needed to figure out where to put the files - dictionary.Add("cuid", contentItem.PersistedContent.Key); - dictionary.Add("puid", dboProperty.PropertyType.Key); - } - + // add extra things needed to figure out where to put the files + dictionary.Add("cuid", contentItem.PersistedContent.Key); + dictionary.Add("puid", dboProperty.PropertyType.Key); + var data = new ContentPropertyData(property.Value, property.PreValues, dictionary); //get the deserialized value from the property editor