Dropzone.js runtime error does not work

When I try to download a large file, the progress bar is 100% instantaneous while the file is still executing, and the progress bar is waiting for it to complete until it completes the download process. How could I do this as long as possible when the download process ends.

enter image description here

It is expected this way until it completes the boot process.

enter image description here

And so when he finished

+6
source share
1 answer

In the drop zone, the calculation of the download progress is not performed, you must do it yourself and specify the percentage for the drop zone component.

When you submit a download request via an HTTP request, you can check the file size to have a total download size. Then, with each response from your server (onData), check how much is uploaded to the entire file size. With the total size and the loaded size, you can set the percentage of loading for the Drop zone.

In addition, there is a complete event that fires when a download is deleted or canceled due to an error.

+1
source

All Articles