Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAV_URL and supporting the port option #3

Open
kumaresan opened this issue Dec 11, 2018 · 1 comment
Open

DAV_URL and supporting the port option #3

kumaresan opened this issue Dec 11, 2018 · 1 comment

Comments

@kumaresan
Copy link

kumaresan commented Dec 11, 2018

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.

@perrotuerto
Copy link

So this makes me thinks that port option still not supported, am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants