I need to slice a large file for downloading. How can I display the browser's built-in progress bar during the download? This is my backend code. enter image description here Question 1: When I view files for download on certain websites, upon clicking the download button, a temporary file is generated in the download path. Then, the browser's built-in progress bar starts executing, displaying progress. While the download is ongoing, the size of the temporary file doesn't change. When the progress bar reaches completion, indicating the download is finished, the temporary file disappears. It's possible that the subsequent file content is appended to this temporary file or the temporary file is deleted, and the new file is re-established. This is my first question.
Question 2: What is the purpose of these temporary files?
My expected outcome is to replicate the download behavior of these websites. The front-end tech stack is based on Vue 2 + Element UI.The backend technology stack uses Java + Spring Boot. enter image description here