0

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?

3
  • 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, 2019 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. Jun 24, 2019 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, 2019 at 9:50

1 Answer 1

0

I don't think there is a standard way for web applications (compared to desktop applications that have operating system standards), but it might also depend on the type/level of security that is applicable to your application. I imagine that you might not want to be able to dismiss toast notifications (or use them) if certain conditions are not met.

You might also want to ask the same question on Information Security StackExchange (https://security.stackexchange.com/) because there will probably be some security related best practices that you want to incorporate into your design.

Your Answer

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

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