]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
upload to destinationPath
authorGirish Ramakrishnan <girish@forwardbias.in>
Fri, 27 Nov 2015 23:06:43 +0000 (15:06 -0800)
committerGirish Ramakrishnan <girish@forwardbias.in>
Fri, 27 Nov 2015 23:06:43 +0000 (15:06 -0800)
cli/actions.js

index e5b0c6ddc3a8f0a00324679967c2cade7bfc755a..6fb98937e73a57f8e26fd5400dfdc092fce04799 100644 (file)
@@ -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));