# dwdav

> Provide some basic methods to upload file to Salesforce B2C Commerce webdav server

Latest version **4.0.0** (published 2025-12-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install dwdav
pnpm add dwdav
yarn add dwdav
bun add dwdav
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-12-18 |
| First published | 2016-05-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18.20.8 |
| Dependencies | 4 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tri Nguyen |
| Maintainers | tridnguyen, zlatin.zlatev, mobify, ecchessman, tlohr, sgd |

## Links

- npm: https://www.npmjs.com/package/dwdav
- Repository: https://github.com/SalesforceCommerceCloud/dwdav
- Homepage: https://github.com/SalesforceCommerceCloud/dwdav#readme
- Issues: https://github.com/SalesforceCommerceCloud/dwdav/issues
- npm.io page: https://npm.io/package/dwdav

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [xml-parser](https://npm.io/package/xml-parser.md) ^1.2.1
- [node-fetch-commonjs](https://npm.io/package/node-fetch-commonjs.md) ^3.3.2

## Recent versions

- 4.0.0 (latest) — 2025-12-18
- 2.4.0 (2fa) — 2016-10-28
- 3.5.1 — 2019-08-27
- 3.5.0 — 2019-08-27
- 3.4.1 — 2019-03-20
- 3.4.0 — 2019-03-20
- 3.3.0 — 2017-03-02
- 3.2.0 — 2017-01-24
- 3.1.0 — 2017-01-24
- 3.0.0 — 2017-01-20
- 2.4.2 — 2017-01-05
- 2.4.1 — 2016-11-29
- 2.3.0 — 2016-06-20
- 2.2.0 — 2016-05-15
- 2.1.0 — 2016-05-15
- … 1 more at https://npm.io/package/dwdav/versions

## README

# dwdav
> Provide some basic methods for working with DW webdav server using [`request`](https://www.npmjs.com/package/request)

This is an under-the-hood library that is used by [`dwupload`](https://www.npmjs.com/package/dwupload) and [`dwlogs`](https://www.npmjs.com/package/dwlogs). Those are probably more likely what you're looking for.

## Installation

```shell
:; npm install dwdav
```

## Usage

```js
var dwdav = require('dwdav')(config);

dwdav.get().then(function (res) {
	console.log(res);
});
```

## config

Below are the default values for the `config` object.

- `hostname`: `localhost`
- `username`: `admin`
- `password`: `password`
- `folder`: `Cartridges`
- `version`: `version1`
- `root`: `.`

`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.

## API

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)`

`filePath` is the path to a local file to be used.

---
_Source: https://npm.io/package/dwdav · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
