mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
fix(dom) uploadFiles: progress
This commit is contained in:
parent
131c59bfb9
commit
5a8252886c
1 changed files with 3 additions and 6 deletions
|
|
@ -423,16 +423,13 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
++i;
|
||||
|
||||
uploader = DOM.load.put(path, file, callback);
|
||||
uploader = DOM.load.put(path, file);
|
||||
uploader.on('progress', function(count) {
|
||||
var max = step(n),
|
||||
value = i * percent(count, 100, max);
|
||||
value = (i - 1) * max + percent(count, 100, max);
|
||||
|
||||
Images.show.load('top');
|
||||
Images.setProgress(value);
|
||||
|
||||
if (i === n)
|
||||
Images.setProgress(100);
|
||||
Images.setProgress(Math.round(value));
|
||||
});
|
||||
|
||||
uploader.on('end', callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue