owncloud / pyocclient

ownCloud client library for Python
MIT License
294 stars 114 forks source link

Fix from_public_link method #268

Closed jablkoj closed 2 years ago

jablkoj commented 3 years ago

If you run your local version of owncloud using docker run -e OWNCLOUD_DOMAIN=localhost:8080 -p8080:8080 owncloud/server

your shared links will have the following form: "http://localhost:8080/s/<token>". However, using such links in the from_public_link function didn't work before, since the url passed to the Client contstructor would be only "http://localhost". This PR fixes this case and the url will be "http://localhost:8080". It doesn't change the url if the port is None.


Also the example in README.rst had a wrong name of the funcion's argument.