elexis-eu / elexifier

https://elexifier.elex.is
3 stars 3 forks source link

Issue with downloading of large files #59

Open andrazrepar opened 2 years ago

andrazrepar commented 2 years ago

The current workflow is as follows:

However, with large files, after the file is prepared and the user clicks the Download button, it takes a few seconds to start the download and in the meantime the screen refreshes and the user already sees the two initial options (with or without namespaces). This is confusing because it seems that immediately clicking one of the two options again cancels the download.

I guess we need to prevent the screen from being refreshed until after the download starts.

gradisarjoze commented 2 years ago
  1. When use clicks download with whichever option, the status of the file is set to Processing.
  2. Anytime the application opens the "Download popup" it asks about the status of the dictionary, if it's processing, its waiting, if it's ready it presents a download button. If status is none of those, the popup asks you to select with/without namespaces.

This could be an API issue.

andrazrepar commented 2 years ago

@LukeItUp is it possible that the status resets before the download starts? Can we delay it somehow so that the with/without namespaces messages does not show until the download has actually started?

LukeItUp commented 2 years ago

Dictionary's status resets when the file starts being served to the client (user). What you are suggesting is changing status after the downloaded file has been served i.e. the request has been fully processed. Flask sadly does not directly support this. Things we could do: