Using Joi for validation in API, is there a way we can validate and allow file size to api upto max limit.?
payload: {
maxBytes: 20715200,
output: 'stream',
parse: true,
allow: 'multipart/form-data',
fileData: Joi.binary().required(),
},
Still getting response -
{
"statusCode": 413,
"error": "Request Entity Too Large",
"message": "Payload content length greater than maximum allowed: 1048576"
}
maxBytes will not be included in validate object, declare outside in seperate payload field.