File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -334,9 +334,8 @@ module.exports = function(AV) {
334334 this . _source = AV . Promise . as ( data . blob , guessedType ) ;
335335 this . _isBlob = true ;
336336 } else if ( typeof ( File ) !== "undefined" && data instanceof File ) {
337- this . _source = readAsync ( data , type ) ;
337+ this . _source = AV . Promise . as ( data , guessedType ) ;
338338 this . _isFileObject = true ;
339- this . _fileObject = data ;
340339 } else if ( AV . _isNode && global . Buffer . isBuffer ( data ) ) {
341340 // use global.Buffer to prevent browserify pack Buffer module
342341 this . _source = AV . Promise . as ( data . toString ( 'base64' ) , guessedType ) ;
@@ -562,7 +561,7 @@ module.exports = function(AV) {
562561 // TODO: remove this code and use qiniu SDK
563562 var dataFormat ;
564563 self . _previousSave = self . _source . then ( function ( data , type ) {
565- dataFormat = self . _fileObject || data ;
564+ dataFormat = data ;
566565 return self . _qiniuToken ( type ) ;
567566 } ) . then ( function ( response ) {
568567 self . _url = response . url ;
You can’t perform that action at this time.
0 commit comments