Compare commits
No commits in common. "89bfd8756ccb710342a2b6edfd2725491385c4b6" and "00482e29f2a635f350377943ac38407f710a9cc3" have entirely different histories.
89bfd8756c
...
00482e29f2
|
@ -118,7 +118,7 @@ def logout():
|
||||||
flash("bye binch", 'info')
|
flash("bye binch", 'info')
|
||||||
return redirect(url_for('login'))
|
return redirect(url_for('login'))
|
||||||
|
|
||||||
@app.route('/upload/', methods=['GET', 'POST'])
|
@app.route('/upload', methods=['GET', 'POST'])
|
||||||
@app.route('/upload/<path:path>', methods=['GET', 'POST'])
|
@app.route('/upload/<path:path>', methods=['GET', 'POST'])
|
||||||
@login_required
|
@login_required
|
||||||
def upload(path=None):
|
def upload(path=None):
|
||||||
|
@ -129,9 +129,6 @@ def upload(path=None):
|
||||||
if not is_secure_path(os.path.join(app.config['SERVE_DIR'], path)):
|
if not is_secure_path(os.path.join(app.config['SERVE_DIR'], path)):
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(app.config['SERVE_DIR'], path)):
|
|
||||||
abort(404)
|
|
||||||
|
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
return render_template('upload.html')
|
return render_template('upload.html')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
||||||
|
|
||||||
|
<title>it's not piracy i swear</title>
|
||||||
|
<meta name="description" content="ftp but worse">
|
||||||
|
|
||||||
|
<link href="/static/style.css" type="text/css" rel="stylesheet" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="mainwrapper">
|
||||||
|
<div id="contentarea">
|
||||||
|
{% for file, size in files %}
|
||||||
|
<a class="nostyle itemwrapper" href="/files/{{ file }}" download>
|
||||||
|
<div class="item">
|
||||||
|
<p class="item-name">{{ file }}</p>
|
||||||
|
<p class="item-size">{{ size }}</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<p id="nofileshead">
|
||||||
|
It's fucking nothing!
|
||||||
|
</p>
|
||||||
|
<p id="nofilesdisc">
|
||||||
|
No files avalible yet. Come back later, eh?
|
||||||
|
</p>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="waifuwrapper">
|
||||||
|
<img id="waifu-lazyflexhack" src="/static/obligitorywaifu.png"></img>
|
||||||
|
<!-- <div id="waifu-spacesaver"></div> -->
|
||||||
|
</div>
|
||||||
|
<img id="waifu" src="/static/obligitorywaifu.png"></img>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -25,7 +25,7 @@
|
||||||
<i class="material-icons">person_add</i>
|
<i class="material-icons">person_add</i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.can_upload and path is defined %}
|
{% if current_user.can_upload and path is not none %}
|
||||||
<a class="nostyle iconbutton" href="{{ url_for('upload', path=path) }}" title="Upload to current directory">
|
<a class="nostyle iconbutton" href="{{ url_for('upload', path=path) }}" title="Upload to current directory">
|
||||||
<i class="material-icons">cloud_upload</i>
|
<i class="material-icons">cloud_upload</i>
|
||||||
</a>
|
</a>
|
||||||
|
|
Reference in New Issue