A WebDav client for Node.js
As simple as
npm add @fatrex/nextdav
import nextdav from 'nextdav';
// Create a client with your server username and password (ie: Nextcloud webdav server)
const client = new nextdav(
'http://webdavhost.test',
'yourusername', // If any
'yourpassword', // If any
);
// Retrieve collections(directories) and files lists
const response = await client.getCollectionContents('/');
if (response) {
const [collections, files] = response;
}
This lib is using Roarr as a debugging library. If you want to print debug logs you must prepend your starting script with ROARR_LOG=true
- Client connect to server with auth
- Client connect to server without auth
- Client retrieves collections list
- Client retrieves files list
- Base client instance
- Files and folders retrieval
- Files download
- Files upload
- Files update and locks