diff options
author | Girish Ramakrishnan <girish@forwardbias.in> | 2015-11-27 15:06:43 -0800 |
---|---|---|
committer | Girish Ramakrishnan <girish@forwardbias.in> | 2015-11-27 15:06:43 -0800 |
commit | 802c67734b461e68d271434291c22a2305fc01a7 (patch) | |
tree | 5c1e0d90c16d5a95ef004f26f0677c1b668269b8 /cli | |
parent | 0f5a7ba229422f25a65e07d65b4768b9ad455a12 (diff) | |
download | Surfer-802c67734b461e68d271434291c22a2305fc01a7.tar.gz Surfer-802c67734b461e68d271434291c22a2305fc01a7.tar.zst Surfer-802c67734b461e68d271434291c22a2305fc01a7.zip |
upload to destinationPath
Diffstat (limited to 'cli')
-rw-r--r-- | cli/actions.js | 2 |
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 | ||