nl_tokens: Upload a simple file ( the size is no more than 150MB ) .
pl_tokens: function ( params ) { var url = 'https://content.dropboxapi.com/2/files/upload' ; var args = { path : getDropboxPath ( params . path ) , mode : { '.tag' : 'overwrite' } , mute : true } ; if ( params . ifMatch ) { args . mode = { '.tag' : 'update' , update : params . ifMatch } ; } return this . _request ( 'POST' , url , { body : params . body , headers : { 'Content-Type' : 'application/octet-stream' , 'Dropbox-API-Arg' : JSON . stringify ( args ) } } ) . then ( ( response ) => { if ( response . status !== 200 && response . status !== 409 ) { return Promise . resolve ( { statusCode : response . status } ) ; } var body = response . responseText ; try { body = JSON . parse ( body ) ; } catch ( e ) { return Promise . reject ( new Error ( 'Invalid API result: ' + body ) ) ; } if ( response . status === 409 ) { if ( compareApiError ( body , [ 'path' , 'conflict' ] ) ) { return this . _getMetadata ( params . path ) . then ( function ( metadata ) { return Promise . resolve ( { statusCode : 412 , revision : metadata . rev } ) ; } ) ; } return Promise . reject ( new Error ( 'API error: ' + body . error_summary ) ) ; } this . _revCache . set ( params . path , <mask> . rev ) ; return Promise . resolve ( { statusCode : response . status , revision : body . rev } ) ; } ) ; }