Fixes: U4-3254 Property level validation not working when no field level validators are used

U4-2683 Ensure all uploaded files are cleaned up when they change for the FileUploadValueEditor
U4-3252 File uploader needs to adhere to DisallowedUploadFiles config
U4-2774 FileUploadValueEditor needs to remove old files
This commit is contained in:
Shannon
2013-10-28 15:34:48 +11:00
parent 3110b199c6
commit 2b7a9389b4
5 changed files with 85 additions and 23 deletions

View File

@@ -45,11 +45,11 @@ namespace Umbraco.Core.IO
public IEnumerable<string> GetThumbnails(string path)
{
var parentDirectory = System.IO.Path.GetDirectoryName(path);
var extension = System.IO.Path.GetExtension(path);
var parentDirectory = Path.GetDirectoryName(path);
var extension = Path.GetExtension(path);
return GetFiles(parentDirectory)
.Where(x => x.StartsWith(path.TrimEnd(extension) + "_thumb"))
.Where(x => x.StartsWith(path.TrimEnd(extension) + "_thumb") || x.StartsWith(path.TrimEnd(extension) + "_big-thumb"))
.ToList();
}
@@ -57,7 +57,7 @@ namespace Umbraco.Core.IO
{
DeleteFile(path);
if (!deleteThumbnails)
if (deleteThumbnails == false)
return;
DeleteThumbnails(path);