Decode URI

This commit is contained in:
Stefan Forstenlechner 2022-04-10 17:56:46 +02:00
parent 8299fd24ec
commit b6ddbfb92b
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ app.use("/images", express.static(publicPath));
app.use(express.static("../picture-gallery-client/build"));
app.get("/api(/*)?", (req, res) => {
const requestedPath = req.path.substring(4);
const requestedPath = decodeURI(req.path.substring(4));
const dirents = fs.readdirSync(publicPath + requestedPath, {
withFileTypes: true,