diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs index b38b19a2d8..08c159481b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs @@ -498,7 +498,7 @@ namespace Umbraco.Core.Persistence.Repositories { if (property.PropertyType.PropertyEditorAlias == Constants.PropertyEditors.UploadFieldAlias && property.Value != null && string.IsNullOrEmpty(property.Value.ToString()) == false - && fs.FileExists(IOHelper.MapPath(property.Value.ToString()))) + && fs.FileExists(fs.GetRelativePath(property.Value.ToString()))) { var relativeFilePath = fs.GetRelativePath(property.Value.ToString()); var parentDirectory = System.IO.Path.GetDirectoryName(relativeFilePath); diff --git a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs index 595fcb033d..2bbb3439ca 100644 --- a/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs @@ -398,7 +398,7 @@ namespace Umbraco.Core.Persistence.Repositories { if (property.PropertyType.PropertyEditorAlias == uploadFieldAlias && string.IsNullOrEmpty(property.Value.ToString()) == false - && fs.FileExists(IOHelper.MapPath(property.Value.ToString()))) + && fs.FileExists(fs.GetRelativePath(property.Value.ToString()))) { var relativeFilePath = fs.GetRelativePath(property.Value.ToString()); var parentDirectory = System.IO.Path.GetDirectoryName(relativeFilePath); diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs index 4934a457d8..28da565b9e 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs @@ -71,7 +71,7 @@ namespace Umbraco.Web.PropertyEditors && x.Value != null && string.IsNullOrEmpty(x.Value.ToString()) == false)) { - if (fs.FileExists(IOHelper.MapPath(property.Value.ToString()))) + if (fs.FileExists(fs.GetRelativePath(property.Value.ToString()))) { var currentPath = fs.GetRelativePath(property.Value.ToString()); var propertyId = e.Copy.Properties.First(x => x.Alias == property.Alias).Id; diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs index bb6aff2e95..468d039936 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs @@ -89,7 +89,7 @@ namespace Umbraco.Web.PropertyEditors if (json["src"] != null && json["src"].ToString().IsNullOrWhiteSpace() == false) { - if (fs.FileExists(IOHelper.MapPath(json["src"].ToString()))) + if (fs.FileExists(fs.GetRelativePath(json["src"].ToString()))) { var currentPath = fs.GetRelativePath(json["src"].ToString()); var propertyId = e.Copy.Properties.First(x => x.Alias == property.Alias).Id;