pc-webserver/views/upload.pug

33 lines
815 B
Plaintext

doctype html
html
head
title Upload files to Lamp
link(rel="icon" href="https://cdn.discordapp.com/emojis/719044450130722919.webp?size=240&quality=lossless")
link(rel="stylesheet" href="assets/upload.css")
body
h1 Upload files to Lamp
div#form
input(type="file" name="file" id="file" multiple)
input(type="submit" onclick="upload()")
script(src="assets/upload.js")
table
thead
th file
th size
th modified
tbody
for file in files
tr
td=file.name
td
-
var h = "B KB MB GB TB PB".split(' ');
var p = file.size;
for (var i of h) {
if (p < 1000) break;
p /= 1000;
}
p = String(Number(p.toFixed(2)))
span(title=file.size.toLocaleString())=`${p} ${i}`
td=file.mtime.toLocaleString()