I want to delete a file immediately after download, how do I do it? I\'ve tried to subclass FilePathResult and override the WriteFile method where
FilePathResult
WriteFile
SOLUTION:
One should either subclass the FileResult or create a custom action filter, but the tricky part is to flush the response before trying to delete the file.