Update file.py (#55)

This commit is contained in:
chenv 2024-08-03 06:54:48 +08:00 committed by GitHub
parent 8177ffa20e
commit 133f6ee39a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class FilesController(WebpageController):
rows += '<tr>\n'
# Show images as they are, show document icon for the rest
if self.isimg.match(files[i]):
shot = "/files/" + files[i]
shot = "files/" + files[i]
elif self.issnd.match(files[i]):
shot = "static/gfx/audio-file.png"
else:
@ -52,7 +52,7 @@ class FilesController(WebpageController):
buttons = ""
# Print out individual tiles
rows += ('<td class="file-tile">' +
('<a href="/files/%s" download="%s">' % (files[i], files[i])) +
('<a href="files/%s" download="%s">' % (files[i], files[i])) +
('<img src="%s" download="%s">' % (shot, files[i])) +
('<p class="file-title">%s</p>' % files[i]) +
('</a>%s</td>\n' % buttons))