Class DocumentUploadLimit
java.lang.Object
org.exoplatform.documents.constant.DocumentUploadLimit
The size limit of a file uploaded into Documents: the one the platform's
upload forms apply, read from the same property with the same default.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe limit when the property is not set, in MB.static final StringThe property holding the limit, in MB.static final longThe most bytes an upload tool reads from a URL: 15 MB, whatever the upload size limit, so the 15 MB the tool descriptions promise is the limit the tools ask for. -
Method Summary
Modifier and TypeMethodDescriptionstatic longThe size limit of an uploaded file, in bytes.static longThe size limit of an uploaded file.
-
Field Details
-
PROPERTY_NAME
-
DEFAULT_MAX_SIZE_IN_MB
public static final long DEFAULT_MAX_SIZE_IN_MBThe limit when the property is not set, in MB.- See Also:
-
URL_FETCH_MAX_BYTES
public static final long URL_FETCH_MAX_BYTESThe most bytes an upload tool reads from a URL: 15 MB, whatever the upload size limit, so the 15 MB the tool descriptions promise is the limit the tools ask for. It is the ceiling of mcp-server's shared fetcher,UploadToolUtils.MAX_FETCH_BYTES, which mcp-server'sfeature/ai-contributioncarries (EXO-90907) and itsdevelopdoes not yet: once that constant is ondevelop, callers use it instead of this one.- See Also:
-
-
Method Details
-
getMaxSizeInMB
public static long getMaxSizeInMB()The size limit of an uploaded file.- Returns:
- the limit in MB: the property's value, or
DEFAULT_MAX_SIZE_IN_MBwhen it is blank, not a number or not positive
-
getMaxBytes
public static long getMaxBytes()The size limit of an uploaded file, in bytes.- Returns:
getMaxSizeInMB()in bytes
-