Commit 5d361bf9 by Johannes

Fix handling of paths with spaces

1 parent f65c7ea8
Showing with 1 additions and 1 deletions
......@@ -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
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!