madisonmlin opened a new pull request, #3728: URL: https://github.com/apache/texera/pull/3728
### Purpose ### This pull request partially addresses issue #3404 by switching workflow result downloads to use the browser's native download functionality. Using the browser to handle downloads enables the browser's built-in download UI, including a progress bar when downloading larger files. ### Changes ### Previously, we used Angular's `HttpClient` to request the result file from the backend as a `Blob` and download the `Blob` to the local filesystem. Now, 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. #### Summary of Changes #### - Added endpoint to generate temporary JWT token, including download parameters (e.g. `workflowId`, `filename`) as claims - Changed frontend logic for local workflow result downloads to use a standard form submission instead of `HttpClient` to request the download, allowing the browser to handle the download - Added endpoint to receive form request and authenticate the request via the JWT token before triggering download ### Demonstration ### -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
