commit 13be9700dd6fa10fd28275faae00d37500d8e160
parent debbc6c89949bc86ae498af4c8a0e4cb688e5be8
Author: parazyd <parazyd@dyne.org>
Date: Tue, 20 Apr 2021 00:04:09 +0200
Some cleanup and correct HTML tag.
Diffstat:
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/blck.py b/blck.py
@@ -14,6 +14,7 @@ import magic
bp = Blueprint('blck', __name__, template_folder='templates')
+
@bp.route("/", methods=['GET', 'POST'])
def index():
if request.method == 'GET':
@@ -52,8 +53,10 @@ def short(c):
rename(safe_join('files', t), safe_join('files', s))
if request.headers.get('X-Forwarded-Proto') == 'https':
- return ''.join([request.url_root.replace('http://', 'https://'),
- args.r.lstrip('/'), s, '\n'])
+ return ''.join([
+ request.url_root.replace('http://', 'https://'),
+ args.r.lstrip('/'), s, '\n'
+ ])
return ''.join([request.url_root + args.r.lstrip('/'), s, '\n'])
diff --git a/templates/index.html b/templates/index.html
@@ -78,7 +78,7 @@
<p class="lead">Upload an <abbr title="It gets deleted when viewed"><u>ephemeral</u></abbr> file</p>
<div class="form">
<form method="post" action="{{ r }}" enctype="multipart/form-data">
- <input type="file" id="upload-input" name="c" class="btn" ="Select file">
+ <input type="file" id="upload-input" name="c" class="btn" value="Select file">
<input type="submit" value="Submit">
</form>
</div>