mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-23 21:29:37 +02:00
Bookmark import.
This commit is contained in:
parent
1fff824957
commit
1aedb87bf4
17 changed files with 327 additions and 8 deletions
|
@ -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'),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue