1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-23 21:29:37 +02:00

Bookmark import.

This commit is contained in:
Jackson D 2022-02-06 08:21:01 -05:00
parent 1fff824957
commit 1aedb87bf4
17 changed files with 327 additions and 8 deletions

View file

@ -14,7 +14,15 @@ const storage = multer.diskStorage({
},
});
const supportedTypes = ['jpg', 'jpeg', 'png', 'svg', 'svg+xml', 'x-icon'];
const supportedTypes = [
'jpg',
'jpeg',
'png',
'svg',
'svg+xml',
'x-icon',
'html',
];
const fileFilter = (req, file, cb) => {
if (supportedTypes.includes(file.mimetype.split('/')[1])) {
@ -26,4 +34,7 @@ const fileFilter = (req, file, cb) => {
const upload = multer({ storage, fileFilter });
module.exports = upload.single('icon');
module.exports = {
icon: upload.single('icon'),
bookmark: upload.single('file'),
};