nova nc knjižnica za pridobivanje urljev

master
Kostanjevec 2022-06-03 19:11:11 +02:00
parent e23204e4dc
commit 47236128f6
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
import nextcloud_client
nc = nextcloud_client.Client('https://obzorje.kompot.si')
nc.login('gia', 'gia0000!')
# nc.put_file('testdir/remotefile.txt', 'localfile.txt')
seznam = nc.list("/GIA CLOUD")
name = seznam[0].get_name()
public_share = nc.share_file_with_link("/GIA CLOUD/"+name)
public_link= public_share.get_link()+"/download/"+name
print(public_link)
def test_file():
return public_link
"""""
options = {
#'webdav_login': 'gia',
#'webdav_password': 'gia0000!',
'webdav_token': '2WmQL-G7Jbg-6t7sN-JBRSe-eBGy5',
'webdav_hostname': 'https://obzorje.kompot.si/remote.php/dav/files/dab82616-284e-103c-9287-6de9b1978576/'
#'webdav_hostname': 'https://obzorje.kompot.si',
#'webdav_root': '/remote.php/dav/files/'
}"""