-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.
Description
Description
I upgraded from 0.9.0 today to 0.10.1
Now the UploadedFile decorator is returning undefined.
The context clearly shows the file with the matching field name.
Minimal code-snippet showcasing the problem
export const fileUploadConfig = {
options: {
fileFilter: (
req: any,
file: Express.Multer.File,
cb: (error: any | null, pass: boolean) => void,
) => {
console.log(file); //{fieldname: 'file', originalname: '...
cb(null, true);
},
},
};
@Post('/upload_file')
async uploadFile(
@Ctx() context: Context,
@UploadedFile('file', fileUploadConfig) body: Express.Multer.File,
) {
console.log(context.file) //{fieldname: 'file', originalname: '...
console.log(body) //undefined
return "this is broken";
}
using recommended packages.
"@koa/multer": "3.0.2",
"multer": "1.4.4",
Metadata
Metadata
Assignees
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.