This commit is contained in:
Marc 2025-05-24 17:57:20 +00:00
commit bb83f51b05

View File

@ -806,10 +806,9 @@ const storage = multer.diskStorage({
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" });
// z.B. /uploads/carousel/171654543-name.jpg
const filePath = `/uploads/carousel/${req.file.filename}`;
res.json({ path: filePath });
});
@ -962,6 +961,7 @@ app.delete("/api/events/:id", async (req, res) => {
// Server starten
app.listen(port, () => {
const nets = os.networkInterfaces();