Fix:Static router for downloading single file library items #627

This commit is contained in:
advplyr 2022-05-23 18:31:11 -05:00
parent 0ad7a98fc7
commit 6cfe583535

View File

@ -17,7 +17,9 @@ class StaticRouter {
if (!item) return res.status(404).send('Item not found with id ' + req.params.id)
var remainingPath = req.params['0']
var fullPath = Path.join(item.path, remainingPath)
var fullPath = null
if (item.isFile) fullPath = item.path
else fullPath = Path.join(item.path, remainingPath)
res.sendFile(fullPath)
})
}