nl_tokens: Perform upload to qiniu
pl_tokens: function ( fileName , retrying ) { let file = assets [ fileName ] || { } ; let key = path . posix . join ( uploadPath , fileName ) ; let putPolicy = new qiniu . rs . PutPolicy ( { scope : bucket + ':' + key } ) ; let uploadToken = putPolicy . uploadToken ( mac ) ; let formUploader = new qiniu . form_up . FormUploader ( qiniuConfig ) ; let putExtra = new qiniu . form_up . PutExtra ( ) ; return new Promise ( ( resolve ) => { let begin = Date . now ( ) ; formUploader . putFile ( uploadToken , key , file . existsAt , putExtra , function ( err , body ) { // handle upload error if ( err ) { // eslint-disable-next-line no-console console . log ( ` ${ fileName } ${ err . message || err . name || err . stack } ` ) ; if ( ! ~ retryFiles . indexOf ( fileName ) ) retryFiles . push ( fileName ) ; } else { uploadedFiles ++ ; } spinner . text = tip ( uploadedFiles , retryFiles . length , totalFiles , retrying ) ; <mask> . duration = Date . now ( ) - begin ; resolve ( body ) ; } ) ; } ) ; }