4 ms·
NestJS has some pretty horrific default settings, like a max 1MB request payload size. And you have to write custom content-type processors for anything other t
by 88913527 5y ago
NestJS has some pretty horrific default settings, like a max 1MB request payload size. And you have to write custom content-type processors for anything other than 'application/json'. So if you're doing say, file upload's over 1MB, you already have to make 2 configuration changes. But you wouldn't assume that OOTB 1 MB file upload isn't supported for what claims to be a full nuts-and-bolts web application framework.
- lcrz 5y ago> a max 1MB request payload size How would that be a bad default, when it's probably more than sufficient for 99% of the use cases out there? It's even the same default as nginx: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size https://nginx.org/en/docs/http/ngx_http_core_module.html#cli... Nest.js is clearly targeting JSON-based CRUD apps, and the defaults are pretty good. File uploads through JSON is not as simple a problem as you try to make it. Are you using bas64 encoding and embedding it in the JSON? Are you using multipart/form-data?