Dropbox File System for webdav-server
webdav-server version 2
Allows to see the list of files/directories from Dropbox.
Install
npm install @webdav-server/dropbox
Usage
// TypeScript
import { v2 as webdav } from 'webdav-server'
import * as dropbox from '@webdav-server/dropbox'
// JavaScript
const webdav = require('webdav-server').v2;
const dropbox = require('@webdav-server/dropbox');
const server = new webdav.WebDAVServer({
// [...]
autoLoad: {
// [...]
serializers: [
new dropbox.DropboxSerializer()
// [...]
]
}
})
server.setFileSystemSync('/myPath', new dropbox.DropboxFileSystem('dropboxAccessKey...'), false);
server.start((s) => console.log('Ready on port', s.address().port));