X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=cli%2Factions.js;h=ea2a3a1d1e5b6280151bf3ea7076b31da54c902d;hb=e628921a338684a4bc3f196c5c39beba8b8f9b68;hp=69ffa10329e225d7592791468e9c51e284369b13;hpb=4b6cf0add4f4f89671f4553a9672a01fbb485df1;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git diff --git a/cli/actions.js b/cli/actions.js index 69ffa10..ea2a3a1 100644 --- a/cli/actions.js +++ b/cli/actions.js @@ -118,7 +118,7 @@ function put(filePath, otherFilePaths, options) { var destinationPath = (destination ? '/' + destination : '') + '/' + relativeFilePath; console.log('Uploading file %s -> %s', relativeFilePath.cyan, destinationPath.cyan); - superagent.put(config.server() + API + destinationPath).query(gQuery).attach('file', file).end(function (error, result) { + superagent.post(config.server() + API + destinationPath).query(gQuery).attach('file', file).end(function (error, result) { if (result && result.statusCode === 403) return callback(new Error('Upload destination ' + destinationPath + ' not allowed')); if (result && result.statusCode !== 201) return callback(new Error('Error uploading file: ' + result.statusCode)); if (error) return callback(error);