fix: resolve mixed content and upload payload too large errors
Build and Deploy / build-and-push (push) Failing after 26s

This commit is contained in:
AI Bot
2026-09-02 01:12:38 +05:30
parent 48cda051a3
commit 39d131a9a5
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ app.post('/api/users/deduct-credit', authenticate, async (req, res) => {
// 10. Upload file
app.post('/api/upload', authenticate, upload.single('file'), (req, res) => {
if (!req.file) return res.status(400).json({ error: 'No file uploaded' });
const url = `${req.protocol}://${req.get('host')}/uploads/${req.file.filename}`;
const url = `/uploads/${req.file.filename}`;
res.json({ url });
});