You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried creating a folder then adding a share to it using nextcloud-link and it fails.
The folder is not created and the share fails.
With the main url of the nextcloud server provided to the nextcloud-link client, adding a share on an existing folder works, but creating a folder does not.
If I add a folder with a generic webdav module, with the webdav-specific url provided in nextcloud files settings, it works.
The bug I suspect is that you need two different URLs in the client, one for webdav functionality and another for other functionality.
Using nextcloud 29
The text was updated successfully, but these errors were encountered:
Your assumption that two different endpoints (request paths) are responsible for creating a share and creating a directory is correct. The former uses the OCS API, while the latter uses WebDAV.
However, nextcloud-link should transparently use either one by passing just a single URL when initialising the client.
Could you please post a minimal failing example for what you're doing, so that we can try and reproduce your error?
import NextcloudClient from "nextcloud-link";
…
const client = new NextcloudClient(
{
"url": "https://myservername:33333/",
"username": “myadmin”,
"password": “pw”
});
…
// GroupFolders exists as a folder in the root directory of the myadmin user
await client.createFolderHierarchy('GroupFolders/'+nextcloudgroupname); // does nothing, no error, folder not created
await client.touchFolder('GroupFolders/'+nextcloudgroupname); // does nothing, no error, folder not created
…
// if I create the folder in the web interface
await client.shares.add('GroupFolders/'+nextcloudgroupname, 1, "leaders", 31); // works perfectly
And then:
await client.touchFolder(‘/GroupFolders/'+nextcloudgroupname); // works
await client.shares.add(‘/GroupFolders/'+nextcloudgroupname, 1, "leaders", 31); // works
What was confusing me is the fact that client.shares.add works with path without initial /, and touchFolder does not.
It is not a bug, just a minor inconvenience to maybe document.
I have tried creating a folder then adding a share to it using nextcloud-link and it fails.
The folder is not created and the share fails.
With the main url of the nextcloud server provided to the nextcloud-link client, adding a share on an existing folder works, but creating a folder does not.
If I add a folder with a generic webdav module, with the webdav-specific url provided in nextcloud files settings, it works.
The bug I suspect is that you need two different URLs in the client, one for webdav functionality and another for other functionality.
Using nextcloud 29
The text was updated successfully, but these errors were encountered: