Commit ba16825c authored by Tristan Cavelier's avatar Tristan Cavelier

util.js onprogress listener added

parent bfef5658
...@@ -311,6 +311,9 @@ function makeBlobDigest(blob) { ...@@ -311,6 +311,9 @@ function makeBlobDigest(blob) {
fr.onerror = function () { fr.onerror = function () {
deferred.reject(); // XXX deferred.reject(); // XXX
}; };
fr.onprogress = function () {
deferred.notify(); // XXX
};
fr.readAsBinaryString(blob); fr.readAsBinaryString(blob);
return deferred.promise(); return deferred.promise();
} }
...@@ -329,6 +332,9 @@ function blobAsBinaryString(blob) { ...@@ -329,6 +332,9 @@ function blobAsBinaryString(blob) {
fr.onerror = function () { fr.onerror = function () {
deferred.reject(); // XXX deferred.reject(); // XXX
}; };
fr.onprogress = function () {
deferred.notify(); // XXX
};
fr.readAsBinaryString(blob); fr.readAsBinaryString(blob);
return deferred.promise(); return deferred.promise();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment