From b342d5f4461154a6b7d642e4050a4e91855992db Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Wed, 18 Feb 2026 09:58:30 +0100 Subject: [PATCH] Update index.js --- backend/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/index.js b/backend/index.js index 5f7b873..9f389cd 100644 --- a/backend/index.js +++ b/backend/index.js @@ -35,8 +35,8 @@ const upload = multer({ storage: storage }); app.use(cors()); app.use(express.json()); -// Serve uploaded files statically -app.use('/uploads', express.static(uploadDir)); +// Serve uploaded files statically at /api/uploads to match the frontend request path passed via Nginx +app.use('/api/uploads', express.static(uploadDir)); // --- HELPER FUNCTIONS --- const safeJsonParse = (val, fallback) => {