I need to run several methods after sending file to a user for a download. What happens is that after I send a file to a user, response is aborted and I can no longer do any
I believe what you are trying won't work.
This is what I would do:
This is the same behavior a lot of file download sites is using. Only issue is if the hidden frame fails (javascript turned off) to perform the request, why a lot of the same sites have the link available if the auto request fails.
Disadvantage: file cleanup.