webdav-client-python icon indicating copy to clipboard operation
webdav-client-python copied to clipboard

owncloud webdav

Open kerimlcr opened this issue 8 years ago • 4 comments

Hi, I tried your client for owncloud upload_sync worked smoothly but download_sync ... I gave the output. What could cause this

c.download_sync(remote_path="http://localhost/owncloud/remote.php/webdav/sync/", local_path="/home/kerim/sync")


Traceback (most recent call last): File "", line 1, in File "/home/kerim/.local/lib/python2.7/site-packages/webdav/client.py", line 417, in download_sync self.download(local_path=local_path, remote_path=remote_path) File "/home/kerim/.local/lib/python2.7/site-packages/webdav/client.py", line 358, in download if self.is_dir(urn.path()): File "/home/kerim/.local/lib/python2.7/site-packages/webdav/client.py", line 845, in is_dir raise RemoteResourceNotFound(remote_path) webdav.exceptions.RemoteResourceNotFound: Remote resource: /http:/localhost/owncloud/remote.php/webdav/sync/ not found


kerimlcr avatar Feb 27 '17 18:02 kerimlcr

In ownCloud, webdav is accessible via /remote.php/webdav

And it's tempting to use ownCloud with this configuration:

options = {
 'webdav_hostname': "https://<hostname>/remote.php/webdav",
 'webdav_login': "login",
 'webdav_password': "password"
}

But in fact you need to use the root option, like this:

options = {
 'webdav_hostname': "https://<hostname>",
 'webdav_login': "login",
 'webdav_password': "password",
 'root': "/remote.php/webdav"
}

Is that your issue?

gregoirechauvet avatar May 26 '17 13:05 gregoirechauvet

I'm using webdav_root option

options = {
 'webdav_hostname': "https://<hostname>",
 'webdav_login': "login",
 'webdav_password': "password",
 'webdav_root': "/remote.php/webdav"
}```

designerror avatar May 29 '17 19:05 designerror

Having the same issue :(

Nayar avatar Mar 03 '18 20:03 Nayar

Be sure if you are using a subdirectory to place that in the webdav_root as well:

For example, say your full webdav url is https://nas.domain.com/cloud/remote.php/webdav/

Your options would look like this:

options = {
 'webdav_hostname': "https://nas.domain.com",
 'webdav_login': "login",
 'webdav_password': "password",
 'webdav_root': "/cloud/remote.php/webdav"
}

krowvin avatar Apr 06 '18 16:04 krowvin