File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ qiniu-js-sdk
7777 // 'time' : function(up,file) {
7878 // var time = (new Date()).getTime();
7979 // do something with 'time'
80- // returnt time;
80+ // return time;
8181 // },
8282 // 'size' : function(up,file) {
8383 // var size = file.size;
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ function QiniuJsSDK() {
350350 if ( x_vars . hasOwnProperty ( x_key ) ) {
351351 if ( typeof x_vars [ x_key ] === 'function' ) {
352352 multipart_params_obj [ 'x:' + x_key ] = x_vars [ x_key ] ( up , file ) ;
353- } else if ( typeof x_vars [ x_key ] === 'string ') {
353+ } else if ( typeof x_vars [ x_key ] !== 'object ') {
354354 multipart_params_obj [ 'x:' + x_key ] = x_vars [ x_key ] ;
355355 }
356356 }
@@ -507,7 +507,7 @@ function QiniuJsSDK() {
507507 if ( x_vars . hasOwnProperty ( x_key ) ) {
508508 if ( typeof x_vars [ x_key ] === 'function' ) {
509509 x_val = that . URLSafeBase64Encode ( x_vars [ x_key ] ( up , file ) ) ;
510- } else if ( typeof x_vars [ x_key ] === 'string ') {
510+ } else if ( typeof x_vars [ x_key ] !== 'object ') {
511511 x_val = that . URLSafeBase64Encode ( x_vars [ x_key ] ) ;
512512 }
513513 x_vars_url += '/x:' + x_key + '/' + x_val ;
@@ -525,6 +525,7 @@ function QiniuJsSDK() {
525525 if ( ajax . readyState === 4 ) {
526526 if ( ajax . status === 200 ) {
527527 var info = ajax . responseText ;
528+
528529 if ( FileUploaded_Handler ) {
529530 FileUploaded_Handler ( up , file , info ) ;
530531 }
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ function QiniuJsSDK() {
350350 if ( x_vars . hasOwnProperty ( x_key ) ) {
351351 if ( typeof x_vars [ x_key ] === 'function' ) {
352352 multipart_params_obj [ 'x:' + x_key ] = x_vars [ x_key ] ( up , file ) ;
353- } else if ( typeof x_vars [ x_key ] === 'string ') {
353+ } else if ( typeof x_vars [ x_key ] !== 'object ') {
354354 multipart_params_obj [ 'x:' + x_key ] = x_vars [ x_key ] ;
355355 }
356356 }
@@ -507,7 +507,7 @@ function QiniuJsSDK() {
507507 if ( x_vars . hasOwnProperty ( x_key ) ) {
508508 if ( typeof x_vars [ x_key ] === 'function' ) {
509509 x_val = that . URLSafeBase64Encode ( x_vars [ x_key ] ( up , file ) ) ;
510- } else if ( typeof x_vars [ x_key ] === 'string ') {
510+ } else if ( typeof x_vars [ x_key ] !== 'object ') {
511511 x_val = that . URLSafeBase64Encode ( x_vars [ x_key ] ) ;
512512 }
513513 x_vars_url += '/x:' + x_key + '/' + x_val ;
@@ -525,6 +525,7 @@ function QiniuJsSDK() {
525525 if ( ajax . readyState === 4 ) {
526526 if ( ajax . status === 200 ) {
527527 var info = ajax . responseText ;
528+
528529 if ( FileUploaded_Handler ) {
529530 FileUploaded_Handler ( up , file , info ) ;
530531 }
You can’t perform that action at this time.
0 commit comments