コード例 #1
0
        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("/"));
        }
コード例 #2
0
        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/");
        }