Test for ShareX stuff

This commit is contained in:
Dominik V. Salonen 2015-12-24 12:14:55 +01:00
parent d61eb2c257
commit f9f7d16fad
1 changed files with 4 additions and 3 deletions

7
run.py
View File

@ -86,9 +86,10 @@ def upload_file():
data["url"] = config["DOMAIN"] + "/" + filename data["url"] = config["DOMAIN"] + "/" + filename
print_log('Main', 'New file processed "' + filename + '"') print_log('Main', 'New file processed "' + filename + '"')
if request.form["source"] == "web": try:
return redirect(url_for('get_file', filename=filename), code=302) if request.form["source"] == "web":
else: return redirect(url_for('get_file', filename=filename), code=302)
except Exception:
return json.dumps(data) return json.dumps(data)
# Return Web UI if we have a GET request # Return Web UI if we have a GET request