This is typically controlled by nginx (or whichever reverse proxy you have deployed). The directive to set for nginx is:
client_max_body_size 100M;
You can obviously set the directive to whatever max limit you prefer, and set it either on the server or location block in nginx.
You might even want to create more specific location blocks for the /api/fileResources
API endpoint to ensure large files cannot be sent or uploaded elsewhere.
There are multiple guides online regarding this topic. Nginx docs here:
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
best,
Lars