Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Extended progress information

Sebastian Tschan edited this page Feb 23, 2020 · 4 revisions

The jQuery File Upload plugin triggers callbacks for progress events, that can be used to display extended progress information, including:

  • Upload speed (formatted as GBps/MBps/KBps/Bps).
  • Remaining upload time (formatted as hh:mm:ss).
  • Uploaded and total bytes (formatted as bit/s, kbit/s, Mbit/s, Gbit/s).
  • Percentage of uploaded bytes.

The UI version of the plugin displays this extended progress information.

If you want to implement your own user interface based on the basic plugin, you can do so using the loaded, total and bitrate data properties:

$('#fileupload').on('fileuploadprogress', function (e, data) {
    console.log(data.loaded, data.total, data.bitrate);
});

For pointers on how to calculate and format those values, have a look at the _renderExtendedProgress function.