we have some private file links that are pasted into emails. When a user clicks the link, if they are not logged in they get something like this:


Once they login and authenticate, the file starts to download in the user's browser.

I'd like to override the automatic download behavior and provide a "download this file?" type prompt first, since users don't often realize the file download starts automatically.

Any ideas? Thanks in advance.

1 Answer 1


Well, there are a few ways you could handle this. All of them are going to involve some code to handle these type of requests. One way I can think of would be to catch these requests on your custom 404 page and redirect the user to the login page with a new destination and keep the file name as a parameter. Then, on the new destination page grab the file download parameter and provide them a big fat button that links to that file.

If they are already logged in and you want to do the same thing you would need some sort of pre-processing filter to capture these and do the same as above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.