Commit 802c6773 by Girish Ramakrishnan

upload to destinationPath

1 parent 0f5a7ba2
Showing with 1 additions and 1 deletions
......@@ -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));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!