expose the pngs

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-11 08:41:28 +02:00
parent 98192c7b00
commit 3e6a3ef52d
2 changed files with 35 additions and 0 deletions

View File

@ -1,4 +1,5 @@
from shutil import move, copyfile
from os import listdir
from files.__main__ import app, limiter
from files.helpers.const import *
@ -7,6 +8,13 @@ from files.helpers.media import *
from files.helpers.wrappers import *
from files.routes.static import marsey_list
@app.get('/asset_submissions/marseys')
@auth_required
def asset_submissions_marseys(v):
images = [x for x in listdir("/asset_submissions/marseys") if x.endswith('png')]
return render_template("asset_submissions.html", v=v, images=images)
@app.get('/asset_submissions/<path:path>')
@limiter.exempt
def asset_submissions(path):

View File

@ -0,0 +1,27 @@
{% extends "default.html" %}
{% block content %}
<pre>
</pre>
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Image</th>
</tr>
</thead>
<tbody id="marseys-table">
{% for image in images %}
<tr>
<td>{{loop.index}}</td>
<td>{{image}}</td>
<td><img loading="lazy" data-bs-toggle="tooltip" src="/asset_submissions/marseys/{{image}}"></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}