https://discord.gg/botpress logo
Using Webdav as a repository?
# 🤝help
d
Hello, I would like to use webdav as a repository for loading/saving files from/to. I am wondering if this is something people do with botpress? Or would I be better off using sftp? I tried the JS below but I suspect that Botpress does not support webdav?
Copy code
import { createClient } from "webdav";
// Set NODE_TLS_REJECT_UNAUTHORIZED to 0
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';

const client = createClient("https://webdav.example.com", {
    authType: "digest",
    username: "myusername",
    password: "mypassword"
});

// Get directory contents
const directoryItems = await client.getDirectoryContents("/");
console.log(directoryItems);
Any thoughts much appreciated!
2 Views