From: Girish Ramakrishnan Date: Fri, 27 Nov 2015 23:06:43 +0000 (-0800) Subject: upload to destinationPath X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=commitdiff_plain;h=802c67734b461e68d271434291c22a2305fc01a7 upload to destinationPath --- diff --git a/cli/actions.js b/cli/actions.js index e5b0c6d..6fb9893 100644 --- a/cli/actions.js +++ b/cli/actions.js @@ -97,7 +97,7 @@ function put(filePath, otherFilePaths, options) { var destinationPath = (options.destination ? '/' + options.destination : '') + '/' + relativeFilePath; console.log('Uploading file %s -> %s', relativeFilePath.cyan, destinationPath.cyan); - superagent.put(config.server() + API + relativeFilePath).query(gQuery).attach('file', file).end(function (error, result) { + superagent.put(config.server() + API + destinationPath).query(gQuery).attach('file', file).end(function (error, result) { if (error) return callback(error); if (result.statusCode !== 201) return callback(new Error('Error uploading file: ' + result.statusCode));