Commit 5d361bf9 by Johannes Zellner

Fix handling of paths with spaces

parent f65c7ea8
......@@ -112,7 +112,7 @@ function get(req, res, next) {
}
function put(req, res, next) {
var filePath = req.params[0];
var filePath = decodeURIComponent(req.params[0]);
if (!(req.files && req.files.file) && !req.query.directory) return next(new HttpError(400, 'missing file or directory'));
if ((req.files && req.files.file) && req.query.directory) return next(new HttpError(400, 'either file or directory'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment