Download button

This commit is contained in:
bingus_violet 2024-04-23 13:19:02 -05:00
parent f9ca0c8adf
commit 34a6cd3458

View file

@ -158,9 +158,9 @@ app.get("/*", (req, res) => {
if (!fileStats.isDirectory()) {
var fileExtension = file.substring(file.lastIndexOf('.') + 1, )
if (videoFormats.includes(fileExtension)) {
addedHTML += `<li><a href="/watch/${userPath}">${file}</a> | ${humanFileSize(fileStats.size)}</li>`
addedHTML += `<li><a href="/watch/${userPath}">${file}</a> | ${humanFileSize(fileStats.size)} | <a href="/download/${userPath}">download</a></li>`
} else {
addedHTML += `<li><a href="./${file}">${file}</a> | ${humanFileSize(fileStats.size)}</li>`
addedHTML += `<li><a href="./${file}">${file}</a> | ${humanFileSize(fileStats.size)} | <a href="/download/${userPath}">download</a></li>`
}
} else {