Added carrousell integration

This commit is contained in:
Marc Wieland 2025-05-24 19:56:53 +02:00
parent 952bc13f68
commit 3d8158e786

View File

@ -787,16 +787,16 @@ const storage = multer.diskStorage({
const upload = multer({ storage }); const upload = multer({ storage });
router.post("/api/teams/:id/carousel-upload", upload.single("image"), (req, res) => { app.post("/api/teams/:id/carousel-upload", upload.single("image"), (req, res) => {
if (!req.file) return res.status(400).json({ error: "Keine Datei hochgeladen" }); if (!req.file) return res.status(400).json({ error: "Keine Datei hochgeladen" });
// z.B. /uploads/carousel/171654543-name.jpg
const filePath = `/uploads/carousel/${req.file.filename}`; const filePath = `/uploads/carousel/${req.file.filename}`;
res.json({ path: filePath }); res.json({ path: filePath });
}); });
// Server starten // Server starten
app.listen(port, () => { app.listen(port, () => {
const nets = os.networkInterfaces(); const nets = os.networkInterfaces();