Closed midoelhawy closed 9 months ago
@midoelhawy please did you find a solution ?
@midoelhawy please did you find a solution ?
Hi @lewatt23
Yes, you need to add multer configuration in your tsoa.json
like this:
{
"entryFile": "./src/main.ts",
"noImplicitAdditionalProperties": "throw-on-extras",
"controllerPathGlobs": ["./src/controllers/*/*.ts", "./src/controllers/*.ts"],
"spec": {
"specVersion": 3,
"outputDirectory": ".",
"securityDefinitions": {
"jwt": {
"description": "JSONWebToken (JWT) authorization",
"bearerFormat": "JWT",
"scheme": "bearer",
"type": "http"
}
}
},
"routes": {
"basePath": "/",
"routesDir": "./src",
"middleware": "express",
"authenticationModule": "./src/authentication.ts"
},
"multerOpts": {
"limits": {
"fileSize": 31457280
}
}
}
Thanks so much.
it Possible to change multer max file size directly from tsoa.json to avoid "MulterError: File too large" Error ?