I have a small form on my page with a button. When the button is clicked, it goes to an MVC controller, which responds with a FileStreamResult
.
The user never navigates away from the current tab as such, it stays open - and a download starts of the file my server responds with.
The server can take a good moment or two to generate the file prior to responding - during which I'd like to display a loader in the browser.
Is this something I have access to on the client? This is not an async request but I guess the equivalent of ajax complete would be ideal. i.e. show a spinner, when the server responds, hide the spinner.
Note: I won't tag this as MVC as I believe this is a client-side issue.