Our web application needs to enable secured file download by requiring HTTP requests to have authorization token.

Due to this, when user clicks download the file will be retrieved using AJAX GET request with the access token. Once the file is in memory, it will be saved to user's hard drive using temporary link pointing to file's data in memory.

Because of this approach, browser doesn't show download progress immediately like in normal file download (in the bottom bar in Chrome). We need a way to tell user that something is going on as it may take some time to retrieve the file data.

We are thinking of showing a toast message and dismiss it when done. I haven't seen many examples of this on the net in many websites.

What is the standard way (if there is any) to do this?

  • About what timespan are we talking here? A few seconds? I would show some loading/waiting animation with something like "Preparing your download..." – Kweamod Jun 21 '19 at 15:37
  • It can be 10-20 seconds if the file is large or network is slow. yes that's what we consider also. – stormtrooper Jun 24 '19 at 2:27
  • Then I would add some Infotext like "Can take up to 20 seconds depending on the file size". Ideal would be a progress bar. – Kweamod Jun 24 '19 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.