add address to notif,
This commit is contained in:
12
code/app.py
12
code/app.py
@@ -107,7 +107,8 @@ def upload(name = None, password = None):
|
||||
"recipient": get_or_none(share,'recipient'),
|
||||
"share": name,
|
||||
"filename": filename,
|
||||
"operation": "upload"
|
||||
"operation": "upload",
|
||||
"address": request.remote_addr
|
||||
})
|
||||
if 'from_gui' in request.form:
|
||||
if request.form['from_gui'] == "true":
|
||||
@@ -189,7 +190,8 @@ def download_direct(name,password,filename):
|
||||
"recipient": get_or_none(share,'recipient'),
|
||||
"share": name,
|
||||
"filename": file_path,
|
||||
"operation": "direct_download"
|
||||
"operation": "direct_download",
|
||||
"address": request.remote_addr
|
||||
})
|
||||
return send_from_directory(directory=share['path'], filename=filename)
|
||||
|
||||
@@ -209,7 +211,8 @@ def download_file(name,filename,password = None):
|
||||
"recipient": get_or_none(share,'recipient'),
|
||||
"share": name,
|
||||
"filename": file_path,
|
||||
"operation": "download"
|
||||
"operation": "download",
|
||||
"address": request.remote_addr
|
||||
})
|
||||
return send_from_directory(directory=share['path'], filename=filename)
|
||||
|
||||
@@ -231,7 +234,8 @@ def download_zip(name,password = None):
|
||||
"recipient": get_or_none(share,'recipient'),
|
||||
"share": name,
|
||||
"filename": name + ".zip",
|
||||
"operation": "zip_download"
|
||||
"operation": "zip_download",
|
||||
"address": request.remote_addr
|
||||
})
|
||||
return send_file(
|
||||
zip_path,
|
||||
|
||||
Reference in New Issue
Block a user