diff --git a/controllers/file.controller.js b/controllers/file.controller.js index 08b3b94..20b2a2c 100644 --- a/controllers/file.controller.js +++ b/controllers/file.controller.js @@ -36,7 +36,7 @@ if (storageMode === "local") { const uploadFile = (req, res) => { storageEngine.writeFile(req, res, () => { const fileHostDomain = - process.env.FILEHOST_DOMAIN || `${req.protocol}://${req.get("host")}`; + process.env.FILEHOST_DOMAIN || `https://${req.get("host")}`; res.status(200).json({ message: "File uploaded successfully", url: `${fileHostDomain}/u/${req.filePath}`,