working URL uploader
This commit is contained in:
@@ -186,6 +186,8 @@ def upload_url():
|
||||
if request.method == 'POST':
|
||||
name = request.form['name']
|
||||
url = request.form['url']
|
||||
if url == "https://...":
|
||||
return "", 200
|
||||
if not is_valid_url(url):
|
||||
return "URL not valid", 400
|
||||
(ok,share) = get_share(name)
|
||||
@@ -200,7 +202,7 @@ def upload_url():
|
||||
filename = os.path.join(
|
||||
share['path'],
|
||||
secure_filename(
|
||||
os.path.basename(url)
|
||||
safe_string(url, ".[]()- ", no_repeat = True)
|
||||
)
|
||||
)
|
||||
if os.path.exists(filename):
|
||||
|
||||
Reference in New Issue
Block a user