This commit is contained in:
parent
f47e26143c
commit
5be04344cc
@ -57,7 +57,10 @@ UPLOAD_PAGE = """
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
.container-images {
|
||||||
|
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@ -133,7 +136,7 @@ UPLOAD_PAGE = """
|
|||||||
<br />
|
<br />
|
||||||
Click <a href="#files">here</a> to see <a href="#files">uploaded files</a> (non-image) at the bottom of this page.<br />
|
Click <a href="#files">here</a> to see <a href="#files">uploaded files</a> (non-image) at the bottom of this page.<br />
|
||||||
<h2>Uploaded images:</h2>
|
<h2>Uploaded images:</h2>
|
||||||
<div class="container-image">
|
<div class="container-images">
|
||||||
[images_html]
|
[images_html]
|
||||||
</div>
|
</div>
|
||||||
<h2 id="files">Uploaded files:</h2>
|
<h2 id="files">Uploaded files:</h2>
|
||||||
@ -189,7 +192,7 @@ def create_images_html(url, image_paths):
|
|||||||
images_html = ""
|
images_html = ""
|
||||||
for image_path in image_paths:
|
for image_path in image_paths:
|
||||||
path = url.rstrip("/") + "/" + image_path.name
|
path = url.rstrip("/") + "/" + image_path.name
|
||||||
images_html += f'<a href="{path}"><img class="thumbnail" src="{path}" alt="{image_path.name}"></a>'
|
images_html += f'<a href="{path}"><img class="thumbnail" src="{path}" alt="{image_path.name}" /></a>\n'
|
||||||
return images_html
|
return images_html
|
||||||
|
|
||||||
|
|
||||||
@ -197,7 +200,7 @@ def create_files_html(url, file_paths):
|
|||||||
files_html = ""
|
files_html = ""
|
||||||
for file_path in file_paths:
|
for file_path in file_paths:
|
||||||
path = url.rstrip("/") + "/" + file_path.name
|
path = url.rstrip("/") + "/" + file_path.name
|
||||||
files_html += f'<a href="{path}">{file_path.name}</a> ({format_size(file_path.stat().st_size)})<br>'
|
files_html += f'<a href="{path}">{file_path.name}</a> ({format_size(file_path.stat().st_size)})\n<br>\n'
|
||||||
return files_html
|
return files_html
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user