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

3
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 + '"')
try:
if request.form["source"] == "web": if request.form["source"] == "web":
return redirect(url_for('get_file', filename=filename), code=302) return redirect(url_for('get_file', filename=filename), code=302)
else: 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