Files
Get the upload byte limit
/a/File_getMaxUploadSize
Return the server-side byte limit used by the shared file-storage library so upload controls can warn users before transfer.
When to use this endpoint
Call File_getMaxUploadSize when configuring a file picker or drop zone. The current limit is 12 MiB, but consumers should read it rather than hard-code it.
Authentication and permissions
The handler reads the configured storage byte limit and has no own login or data access check. Use the normal signed API/session transport; no tenant data is read by this handler.
When department/team or Assigned Jobs Only scope is configured for the actor, the dispatcher adds record-scope checks. This is selected by account features/actor flags, separately from the CRM2-only Files View check; the existing TeamAccess entry guard has no CRM-version condition. A scoped caller’s parameterless request can be rejected as an unscoped collection even though this handler reads only a constant. Confirm this compatibility edge before relying on it for such an actor.
Parameters
This endpoint has no operation-specific parameters.
Example request
$limit = FM_api('File_getMaxUploadSize');
Example response
{
"ok": 1,
"max_upload_size": 12582912
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The value is bytes and comes from
FILESLIB_MAXSIZE. There is no tenant setting, filtering, pagination, or side effect.
Side effects
- No content read, storage hydration, mail or record mutation.
See it in Fieldmotion
CRM1
Hover or use a file-upload control before its first upload. The shared uploader fetches the limit for its tooltip.
CRM2
Open any modern file drop zone. CRM2’s upload helper calls the same route while configuring maximum size.
Related endpoints
File_uploadandFiles_uploadenforce this storage-library limit.- File identifiers and downloads explains file ID, resource ID, type enum, stored URL and the different content response shapes.