From d619823352ff882c0e26ad409b3e3101cf28afaf Mon Sep 17 00:00:00 2001 From: Paul Sori Date: Sun, 9 Sep 2018 01:06:09 -0400 Subject: [PATCH] upload tweak --- modules/file-explorer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/file-explorer.js b/modules/file-explorer.js index 3eee7fb..2780941 100644 --- a/modules/file-explorer.js +++ b/modules/file-explorer.js @@ -14,6 +14,11 @@ exports.setup = function(mstream, program) { return res.status(500).json({ error: 'No Location Provided' }); } const pathInfo = program.getVPathInfo(req.headers['data-location']); + if (!pathInfo.fullPath) { + return res.status(500).json({ error: 'Location could not be parsed' }); + } + + // TODO: Check if path exits, if not make the path const busboy = new Busboy({ headers: req.headers });