I've added the route "validate file format" when uploading file. The changed is too much because i have merge from main to take a newest structure when working with my branch on the old structure.
See #2 for more information
In this issue, i'm using:
multer : handle the upload processing
I have define the file structure receive from multer
I'm changing to use multer with buffer data instead, hold the data as buffer (prevent it write to file). But my solution affects the validate condition (ensure file can be open, do not corrupted). The buffer is always can read even file is corrupted.
I've added the route "validate file format" when uploading file. The changed is too much because i have merge from main to take a newest structure when working with my branch on the old structure.
In this issue, i'm using:
multer
: handle the upload processingxlsx
: handle file excelFile is corrupted
error/^(\w+\s)+(Dreame).(vi|en).(xlsx|xls|csv)$/
<=10MB (10000000 Bytes in decimal)
Testing: