0.28.1
elements man releases/v0-28-1One upload limit replaces the request body and rpc limits. A config that still
has maxBody or maxRpcBytes builds, but they are ignored and the 25 MB
default applies. A route with maxBody fails the build.
maxUpload
server.maxUpload in config.jsoc is the largest request the app accepts, in
bytes: every request body, whatever its type, and every rpc message. The
default is 25 MB. A route's maxUpload raises or lowers it for that route,
and the routes inside a mount inherit the mount's (elements man router).
maxBody: 0 is gone: a route that takes large files sets a large maxUpload.
config.jsoc// before server: { maxBody: { json: 4194304, multipart: 104857600 }, maxRpcBytes: 67108864 } // after server: { maxUpload: 104857600 }
index.ts// before app.route({ method: "post", path: "/api/videos", handler: receiveVideo, maxBody: { multipart: 500 * 1024 * 1024 } }); // after app.route({ method: "post", path: "/api/videos", handler: receiveVideo, maxUpload: 500 * 1024 * 1024 });
Other Changes
- The load balancer no longer limits request size. The app's
maxUploadis the only limit. elements versionprints the installed version.elements uninstall, or a branch switch that drops a package, no longer leaves a stale@typespackage that fails every build.- An rpc message over the limit no longer stops the app: the call fails with "Request too large" and the app keeps running.