Added icon change
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 39s

This commit is contained in:
2026-04-26 21:12:08 +02:00
parent 9048bb0f11
commit 475887420c
20 changed files with 668 additions and 41 deletions

View File

@@ -1,14 +1,22 @@
const multer = require('multer');
const path = require('path');
const fs = require('fs');
const uploadDir = path.join(__dirname, '..', 'uploads'); // adjust if needed
if (!fs.existsSync(uploadDir)) {
fs.mkdirSync(uploadDir, { recursive: true });
}
var storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, 'uploads')
cb(null, uploadDir);
},
filename: function (req, file, cb) {
cb(null, file.fieldname + '-' + Date.now())
const ext = path.extname(file.originalname);
cb(null, file.fieldname + '-' + Date.now() + ext);
}
});
var upload = multer({storage: storage});
module.exports = upload;
module.exports = upload;