Closed FrancisFire closed 3 years ago
Hi @FrancisFire, have a look at the tests, they might help you get started until we add some usage examples.
The tests don't seem to be helping at all to be honest
What exactly is your issue, could you provide relevant code snippets please ?
I'd just like to instantiate a new client with parameters such as the webdav's url, an username and a password (hopefully an app's password) and have a check of the connectivity. Some little informations about this simple task are nowhere to be found in this repository. Because of this problem, I don't have any relevant code snippets of mine.
const client = new NextcloudClient({
username: YOUR_USERNAME,
password: YOUR_PASSWORD,
url: YOUR_URL
});
await client.checkConnectivity();
Used in these tests: https://github.com/tentwentyfour/nextcloud-link/blob/master/tests/webdav-jest.ts
Thank you so much. The issue that I'm currently facing is related to url and password. At the moment I'll try using the "/remote.php/webdav" url along with an app password generated from nextcloud. Am I supposed to use these url and password?
Use you nextcloud admin username and password. Use the same url you would use to access your nextcloud instance via browser.
No matter what, I'll always obtain a false boolean value. I'm really trying all the possibilities given by the urls and passwords that I have
Try checking the connectivity every few seconds until it's eventually connected, if it takes longer than 30 seconds, then there's probably either an issue with your credentials or some other issue.
Hi @FrancisFire
Thanks for the heads up on the missing examples section, we should definitely add one!
If your problem persists, could you please supply a minimal example that we could use to reproduce the problem? Say a docker-compose
file (or just the command line to start a single container) for a Nextcloud docker container and your JavaScript
or Typescript
snippet that tries to establish a connection.
It would be nice if there were some useful examples to make this plugin work properly. Tell me if I'm missing any detail as I don't even know where to start.