I'm using multer and express to save image in upload folder. Everything was working fine in local env but after hosting it in cpanel hosting image doesnot load. The response from the api is https://tntplannernepal.com/uploads/1691596599025_IMG_5424.jpeg but when i click it it gives 404. Image exists in upload folder as well in the server.
const express = require("express");
const bodyParser = require("body-parser");
//cors provides Express middleware to enable CORS
const cors = require("cors");
const connectDb = require("./config/db");
const app = express();
app.use(cors());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use("/uploads", express.static("uploads"));
connectDb();
app.listen();