Azure.uploadFile()

Uploads a file to a given website, overwriting if it already exists.

Usage

Hover over inputs/exits for more info.

var Azure = require('machinepack-azure');


// Uploads a file to a given website, overwriting if it already exists.

Azure.uploadFile({

deploymentUser: 'johndoe',

deploymentPassword: 'p@ssw0rd',

fileLocation: '',

remotePath: '/site/wwwroot/myfile.zip',

website: 'mysite',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

deploymentUser required

The deployment username for the website

'johndoe'
deploymentPassword required

The deployment password for the website

'p@ssw0rd'
fileLocation required

The path to the file that should be uploaded

''
remotePath required

The path the file should be uploaded to, including the filename

'/site/wwwroot/myfile.zip'
website required

The name of the website the file should be uploaded to

'mysite'

Exits

error

An unexpected error occurred.

success

OK.