Skip to content

Commit 03879b6

Browse files
committed
* temp fix 'progress' event
1 parent 0b54f4a commit 03879b6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/FileAPI.Flash.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
})();
2222

2323

24-
if( (0 || !api.support.html5) && api.support.flash ) (function (){
24+
if( (0 || !api.support.cors) && api.support.flash ) (function (){
2525
var
2626
_attr = api.uid()
2727
, _retry = 0
@@ -162,7 +162,6 @@
162162
var type = evt.type;
163163

164164
if( type == 'ready' ){
165-
api.log('Flash.event.'+evt.type+':', evt);
166165
flash.ready();
167166
setTimeout(function (){ flash.mouseenter(evt); }, 50);
168167
return true;
@@ -431,9 +430,10 @@
431430
, callback: _wrap(function upload(evt){
432431
var type = evt.type, result = evt.result;
433432

434-
api.log('flash.upload.'+type+':', evt.status, evt);
433+
api.log('flash.upload.'+type+':', evt);
435434

436435
if( type == 'progress' ){
436+
evt.loaded = Math.min(evt.loaded, evt.total); // @todo fixme
437437
evt.lengthComputable = true;
438438
options.progress(evt);
439439
}
@@ -576,4 +576,4 @@
576576
});
577577
dataURICheck.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
578578
})();
579-
})(FileAPI, this, document);
579+
})(FileAPI, window, document);

0 commit comments

Comments
 (0)