feat: import customers/vendors

This commit is contained in:
Ahmed Bouhuolia
2024-03-28 00:05:02 +02:00
parent fc1d123c6b
commit 7a3e121942
12 changed files with 437 additions and 48 deletions

View File

@@ -4,7 +4,8 @@ import { ServiceError } from '@/exceptions';
export function allowSheetExtensions(req, file, cb) {
if (
file.mimetype !== 'text/csv' &&
file.mimetype !== 'application/vnd.ms-excel'
file.mimetype !== 'application/vnd.ms-excel' &&
file.mimetype !== 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
) {
cb(new ServiceError('IMPORTED_FILE_EXTENSION_INVALID'));