public object Any(DeleteUpload request) { var file = request.Id + ".png"; var filesToDelete = new[] { UploadsDir.CombineWith(file), ThumbnailsDir.CombineWith(file) }.ToList(); ImageSizes.Each(x => filesToDelete.Add(UploadsDir.CombineWith(x, file))); VirtualFiles.DeleteFiles(filesToDelete); return(HttpResult.Redirect("/")); }
public object Any(DeleteUpload request) { var file = request.Id + ".png"; var filesToDelete = new[] { UploadsDir.CombineWith(file), ThumbnailsDir.CombineWith(file) }.ToList(); ImageSizes.Each(x => filesToDelete.Add(UploadsDir.CombineWith(x, file))); VirtualFiles.DeleteFiles(filesToDelete); return HttpResult.Redirect("/imgur/"); }