Class DocumentUploadLimit

java.lang.Object
org.exoplatform.documents.constant.DocumentUploadLimit

public final class DocumentUploadLimit extends Object
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 Details

    • PROPERTY_NAME

      public static final String PROPERTY_NAME
      The property holding the limit, in MB.
      See Also:
    • DEFAULT_MAX_SIZE_IN_MB

      public static final long DEFAULT_MAX_SIZE_IN_MB
      The limit when the property is not set, in MB.
      See Also:
    • URL_FETCH_MAX_BYTES

      public static final long URL_FETCH_MAX_BYTES
      The 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's feature/ai-contribution carries (EXO-90907) and its develop does not yet: once that constant is on develop, 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_MB when 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