aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish@forwardbias.in>2015-11-27 15:06:43 -0800
committerGirish Ramakrishnan <girish@forwardbias.in>2015-11-27 15:06:43 -0800
commit802c67734b461e68d271434291c22a2305fc01a7 (patch)
tree5c1e0d90c16d5a95ef004f26f0677c1b668269b8
parent0f5a7ba229422f25a65e07d65b4768b9ad455a12 (diff)
downloadSurfer-802c67734b461e68d271434291c22a2305fc01a7.tar.gz
Surfer-802c67734b461e68d271434291c22a2305fc01a7.tar.zst
Surfer-802c67734b461e68d271434291c22a2305fc01a7.zip
upload to destinationPath
-rw-r--r--cli/actions.js2
1 files changed, 1 insertions, 1 deletions
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) {
97 var destinationPath = (options.destination ? '/' + options.destination : '') + '/' + relativeFilePath; 97 var destinationPath = (options.destination ? '/' + options.destination : '') + '/' + relativeFilePath;
98 console.log('Uploading file %s -> %s', relativeFilePath.cyan, destinationPath.cyan); 98 console.log('Uploading file %s -> %s', relativeFilePath.cyan, destinationPath.cyan);
99 99
100 superagent.put(config.server() + API + relativeFilePath).query(gQuery).attach('file', file).end(function (error, result) { 100 superagent.put(config.server() + API + destinationPath).query(gQuery).attach('file', file).end(function (error, result) {
101 if (error) return callback(error); 101 if (error) return callback(error);
102 if (result.statusCode !== 201) return callback(new Error('Error uploading file: ' + result.statusCode)); 102 if (result.statusCode !== 201) return callback(new Error('Error uploading file: ' + result.statusCode));
103 103