nl_tokens: 分块上传 初始化分块上传
pl_tokens: function multipartInit ( params , callback ) { var xml ; var headers = params . Headers ; var userAgent = navigator && navigator . userAgent || '' ; var m = userAgent . match ( /  TBS\/(\d{6})  / ) ; if ( location . protocol === 'http:' && m && m [ 1 ] . length <= 6 && m [ 1 ] < '044429' ) { xml = util . json2xml ( { } ) ; headers [ 'Content-MD5' ] = util . binaryBase64 ( util . md5 ( xml ) ) ; // 如果没有 Content-Type 指定一个 if ( ! headers [ 'Content-Type' ] ) { headers [ 'Content-Type' ] = ( params . Body && params . Body . type ) || 'application/octet-stream' ; } } // 特殊处理 Cache-Control ! headers [ 'Cache-Control' ] && ( headers [ 'Cache-Control' ] = '' ) ; submitRequest . call ( this , { Action : 'name/cos:InitiateMultipartUpload' , method : 'POST' , Bucket : params . Bucket , Region : params . Region , Key : params . Key , action : 'uploads' , headers : params . Headers , body : xml , } , function ( err , data ) { if ( err ) { return callback ( <mask> ) ; } data = util . clone ( data || { } ) ; if ( data && data . InitiateMultipartUploadResult ) { return callback ( null , util . extend ( data . InitiateMultipartUploadResult , { statusCode : data . statusCode , headers : data . headers , } ) ) ; } callback ( null , data ) ; } ) ; }