diff --git a/server/routers/StaticRouter.js b/server/routers/StaticRouter.js index b571869f..24b6f6da 100644 --- a/server/routers/StaticRouter.js +++ b/server/routers/StaticRouter.js @@ -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) }) }