forgot to commit this

This commit is contained in:
May 2023-02-27 10:57:45 -08:00
parent edb04cc3ec
commit f98f90e58a

View file

@ -152,10 +152,10 @@ app.get("/download/:fileId",(req,res) => {
)
.replace(/\<\!\-\-preview\-\-\>/g,
file.mime.startsWith("image/")
? `<div style="min-height:10px"></div><img src="http${req.secure ? "s" :""}://${req.headers.host}/file/${req.params.fileId}" />`
? `<div style="min-height:10px"></div><img src="/file/${req.params.fileId}" />`
: (
file.mime.startsWith("video/")
? `<div style="min-height:10px"></div><video src="http${req.secure ? "s" :""}://${req.headers.host}/file/${req.params.fileId}" controls></video>`
? `<div style="min-height:10px"></div><video src="/file/${req.params.fileId}" controls></video>`
: ""
)
)