Using Nextcloud, webdav and node-red

I am trying to list and upload a file to nextcloud with node-red
I have tried using the kuehnelbs node/node-red-contrib-nextcloud
I was successful in the listing but uploading gave me an error :
"self signed certificate in certificate chain"
(which I'm looking at now what it is)( I asked the author, but he doesn't answer)

I have also tried to use the Webdav library directly, but it gives me the same error and no results

With webdav i use:

const webdav = global.get("webdav")
const https = global.get("https")
var server = {address:"https://myip/nextcloud/remote.php/webdav/",
user:"",
password:"",
insecure:true,
},
directory = "/"
node.warn(server)
var client = webdav.createClient(
server.address, {
username: server.user,
password: "server.password",
digest: true,
}
);
node.warn({client:client})
node.warn(directory)
const option = {}
if (server.insecure) {
option.agent = https.Agent({ rejectUnauthorized: false })
}
node.warn(option)
msg.directoryItems=client.getDirectoryContents(directory, option)
.then(function (contents) {
node.send({ 'payload': contents })
}, function (error) {
node.error({error: error})
})
return msg

things to note: use windows and node-red 1.0.3

If someone has used nexcloud with node-red or knows how to correct this error, I would appreciate it

If IRC there are two versions of this node that have been published.

I am using @kuehnelbs/node-red-contrib-nextcloud v0.1.3 and I don't get this error.

Indeed, I am not getting any errors, nor am I getting any files either.

So it appears that the "list" node works ok, but the other nodes may be problematic. Pity.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.