madisonmlin opened a new issue, #3734:
URL: https://github.com/apache/texera/issues/3734

   _This issue was raised with PR #3728._
   
   ***Issue***
   This issue re-addresses part of a larger issue, #3404, which describes how 
the download of workflow results and datasets (both single-file and multi-file 
downloads) does not trigger any progress indicator by the browser. This issue 
specifically addresses the lack of progress indicator for **single-file 
workflow result downloads**. 
   
   Absence of a progress indicator means that, for large files, users see no 
feedback about the download progress until the file suddenly finishes 
downloading. This creates poor user experience because it causes uncertainty 
about the download status. 
   
   When the browser handles a file download, its download UI is displayed, 
including a progress bar to indicate download progress. If this download UI is 
not displayed, it means that the browser is not handling the download. In this 
case, Angular's `HttpClient` makes the request for the file to be downloaded to 
JavaScript memory as a `Blob`, then writes the `Blob` into the local filesystem.
   
   ***Fix***
   To switch downloads for single-file workflow results specifically to use 
browser downloads, we use a standard HTML form submission to request the result 
file, allowing the browser to handle the download. The backend logic for 
generating the file stream remains the same.
   
   Headers such as Authorization (used for Bearer tokens) cannot be added to 
standard form submissions. To work around this, the frontend first requests a 
JWT token string and includes it in the form data. The backend authenticates 
the request by decoding the JWT-- which contains the download parameters-- and 
verifying that the user has a valid role.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to