From b6ddbfb92b2770cf1d11f980ec63bc302286c6e5 Mon Sep 17 00:00:00 2001 From: Stefan Forstenlechner Date: Sun, 10 Apr 2022 17:56:46 +0200 Subject: [PATCH] Decode URI --- picture-gallery-server/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picture-gallery-server/src/app.ts b/picture-gallery-server/src/app.ts index 1ce87a5..d8360cf 100644 --- a/picture-gallery-server/src/app.ts +++ b/picture-gallery-server/src/app.ts @@ -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,