Browse Source

Edited Propfind to return fileid

main
Lisa-Hoffmann 3 years ago
committed by GitHub
parent
commit
7461c98286
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      trying_to_fix_nextcloud.py

4
trying_to_fix_nextcloud.py

@ -5,7 +5,9 @@ import sys
# Prepare and send the propfind request return xml string
def propfind(path,auth):
headers = {"Depth":"1"}
req = r = requests.Request("PROPFIND", path, headers=headers, auth=auth)
# This body returns only the timelastmodified and the fileid variable
data = "<d:propfind xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\">"+"<d:prop>"+"<d:getlastmodified />"+ "<oc:fileid />"+"</d:prop>"+"</d:propfind>"
req = r = requests.Request("PROPFIND", path, headers=headers, auth=auth, data=data)
prepped = req.prepare()
s = requests.Session()

Loading…
Cancel
Save