Download button
This commit is contained in:
parent
f9ca0c8adf
commit
34a6cd3458
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue