nextcloud icon indicating copy to clipboard operation
nextcloud copied to clipboard

DAV_URL and supporting the port option

Open kumaresan opened this issue 5 years ago • 1 comments

Hi,

  1. Default Webdav in the latest version of Nextcloud is remote.php/webdav and not remote.php/dav. It worked only after changing the line 4, in lib/nextcloud/webdav_api.rb DAV_URL = "remote.php/dav".freeze to DAV_URL = "remote.php/webdav".freeze

  2. Say if the URL contains the port, for example - docker installations (localhost:8080) - The gem does not work. It worked only after changing the line 11, in lib/nextcloud/webdav_api.rb from @url = URI(@url.scheme + "://" + @url.host + "/" + DAV_URL) to @url = URI(@url.scheme + "://" + @url.host + ":" + @url.port.to_s + "/" + DAV_URL)

  3. The same gem works for own cloud too, but in case if we have a path, Say - https:///abc.com/nextcloud/remote.php/webdav - it does not work due to the below reason. LIne 4, in lib/nextcloud/webdav_api.rb - DAV_URL = "remote.php/webdav".freeze which has to be DAV_URL = "nextcloud/remote.php/webdav".freeze for the above case. Will it be possible to add it as option while initializing. Currently we have,

nextcloud = Nextcloud.new( url: "https://cloud.yourdomain.com", username: "your_username", password: "your_password" ) could be made as nextcloud = Nextcloud.new( url: "https://cloud.yourdomain.com", webdav: "nextcloud/remote.php/webdav", username: "your_username", password: "your_password" ) This would fix the issue #1 which was reported earlier.

kumaresan avatar Dec 11 '18 07:12 kumaresan