copy a new file with the name,if the name is exist, auto give a name (n) name.
share a ffile to open . add edite.
test code :
def doso(source=source, dist=dist):
myre = {"data": {"src": "", "error": ""}, "success": False}
with SynologyDrive(NAS_USER, NAS_PASS, NAS_IP, https=False) as synd:
synd.get_teamfolder_info()
re = synd.copy(source, dist)
if (re['success']):
sre = synd.share_file(re['data']['file_id'])
if (sre["success"]):
myre['success'] = True
print(myre)
myre['data']['src'] = sre['data']["url"]
copy a new file with the name,if the name is exist, auto give a name (n) name. share a ffile to open . add edite. test code : def doso(source=source, dist=dist): myre = {"data": {"src": "", "error": ""}, "success": False} with SynologyDrive(NAS_USER, NAS_PASS, NAS_IP, https=False) as synd: synd.get_teamfolder_info() re = synd.copy(source, dist) if (re['success']): sre = synd.share_file(re['data']['file_id']) if (sre["success"]): myre['success'] = True print(myre) myre['data']['src'] = sre['data']["url"]
print(sre)