tSome cleanup and correct HTML tag. - blck - ephemeral pastebin/url shortener (HTM) git clone https://git.parazyd.org/blck (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 13be9700dd6fa10fd28275faae00d37500d8e160 (DIR) parent debbc6c89949bc86ae498af4c8a0e4cb688e5be8 (HTM) Author: parazyd <parazyd@dyne.org> Date: Tue, 20 Apr 2021 00:04:09 +0200 Some cleanup and correct HTML tag. Diffstat: M blck.py | 7 +++++-- M templates/index.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) --- (DIR) diff --git a/blck.py b/blck.py t@@ -14,6 +14,7 @@ import magic bp = Blueprint('blck', __name__, template_folder='templates') + @bp.route("/", methods=['GET', 'POST']) def index(): if request.method == 'GET': t@@ -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']) (DIR) diff --git a/templates/index.html b/templates/index.html t@@ -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>