yarn add multer body-parser xlsx
yarn add @types/multer -D
- This is the data of file transfer by multer
{
"fieldname": "myFile",
"originalname": "demo.txt",
"encoding": "7bit",
"mimetype": "text/plain",
"destination": "./uploads",
"filename": "myFile-1712912837970",
"path": "uploads/myFile-1712912837970",
"size": 7
}
description: validate file format
method: POST
path: /file/upload
body{
form-data: {
myFile: file
}
}