Stuk/jszip-utils

Allow progress info while downloading

GuillaumeLeclerc opened this issue · 4 comments

The XHR object allow you to know the progess of the download. It might be a good thing to be able to access it using this.

I implemented this on a fork #19 and submitted it as a PR.

Is not there any solution for this yet?

Stuk commented

Just a bit of a delay. I've reviewed the PR.

Stuk commented

Released as version v0.1.0.

Pass an options object with a progress callback:

JSZipUtils.getBinaryContent("ref/amount.txt", {
    progress: function(e) {
        console.log(e.percent + "% loaded");
    },
    callback: function (err, data) {
        // ...
    }
});