Provide some basic methods to upload file to Demandware webdav server. This is the extended version of the original dwdav module.
request``shell`
:; npm install dwdav-extend
`js
var dwdav = require('dwdav-extend')(config);
dwdav.get().then(function (res) {
console.log(res);
});
`
Below are the default values for the config object.
- hostname: localhostusername
- : adminpassword
- : passwordfolder
- : Cartridgesversion
- : version1root
- : .
root option allows for path resolution of the file to upload _relative_ to a directory.p12 allows for 2-factor authentication.self-signed allows for self-signed cert to be used.
All methods are promise-based, i.e. they return a promise.
- propfind(filePath, root)get(filePath, root)
- post(filePath, root)
- unzip(filePath, root)
- postAndUnzip(filePath, root)
- delete(filePath, root)
- mkcol(filePath, root)
- move(filePath, targetFilePath, root)
-
filePath is the path to a local file to be used, targetFilePath` is destination path to be used.