Is there a way to get the progress of the html input file as it is being loaded into the browser?
I have an application in which I’m trying to upload a large file (about a gigabyte) to my server.
I have a basic html fine input to get the file onto the browser and then a submit button, which sends the file to the server. I also have a progress bar demonstrating the progress of uploading the file to the server.
The issue I’m running into is that just getting the file from the html input element can take a long time, over a minute for a one gigabyte file. It’s a poor user experience to select a file and then see nothing happen for over a minute. Is there a way to get the progress of the html file input?
I have seen this question already here: How to get onloading progress of input type=file? but found the answer unsatisfying, and that question is over 7 years old by now.
I don’t think this is relevant, but just in case: it’s an angular-ionic application.
The basic input file html looks like this:
<input type="file" (change)="fileEvent($event)">