Components

custominternalfileupload

File upload that pre-uploads to the CDN on selection and sends only the CDN reference in the application payload.

File upload that pre-uploads to the CDN on selection and sends only the CDN reference in the application payload. Use for large or sensitive documents where sending base64 inline would bloat the submission.

Read Form Rules before using this component — keys, labels, required fields, expressions, visibility, and validation all follow shared conventions.

When to use

  • Civil registration documents (birth certificates, marriage certificates, death certificates)
  • Any document where large or sensitive files should not travel as base64 in the application payload
  • The file is stored by IremboHub's CDN — no external integration endpoint is involved

When NOT to use

Instead of custominternalfileupload, use…For…
customfileuploadSmall attachments that can be sent inline as base64 with the payload
externalfileuploadFiles that must be pushed directly to an external system via an integration endpoint at upload time

Props

PropTypeRequired?Description
labelstringrequiredVisible label. Must be unique across the form.
requiredbooleanrequiredAlways false. The expression controls the runtime value.
defaultRequiredbooleanrequiredtrue for required fields, false for optional ones.
allowedFormatsarrayrequiredAccepted file extensions in lowercase (e.g. ["pdf"]). Civil documents are typically PDF only.
maximumUploadSizenumberrequiredMaximum file size in KB (civil documents typically 500).
minimumUploadSizenumberoptionalMinimum file size in KB. Use 1 to prevent empty files.
placeholderstringoptionalText shown on the upload button.
hintstringoptionalHelp text describing which document is required.
hideFieldbooleanoptionalHides the field and excludes its value. Toggle via expressions["props.hideField"].

Validation messages

KeyWhen requiredNotes
requiredAlways
invalidfileformatAlwaysQuote the field label and state accepted formats.
maximumUploadSizeAlwaysQuote the field label and state the size limit.
minimumUploadSizeWhen minimumUploadSize is set

Examples

Birth certificate (conditionally required)

{
  "key": "BIRTH_CERTIFICATE",
  "type": "custominternalfileupload",
  "props": {
    "label": "Birth Certificate",
    "placeholder": "Select file to upload",
    "required": false,
    "defaultRequired": true,
    "allowedFormats": ["pdf"],
    "maximumUploadSize": 500
  },
  "expressions": {
    "props.required": "!(field?.props?.hideField || field?.hide) && field?.props?.defaultRequired",
    "hide": "!(model?.RELATIONSHIP === 'Child')"
  },
  "validation": {
    "messages": {
      "required": "This field is required.",
      "invalidfileformat": "\"Birth Certificate\" only accepts PDF format.",
      "maximumUploadSize": "\"Birth Certificate\" must be smaller than 500 KB."
    }
  }
}

With minimum size and hint

{
  "key": "MARRIAGE_CERTIFICATE",
  "type": "custominternalfileupload",
  "props": {
    "label": "Marriage Certificate",
    "placeholder": "Select file to upload",
    "required": false,
    "defaultRequired": true,
    "allowedFormats": ["pdf"],
    "maximumUploadSize": 500,
    "minimumUploadSize": 1,
    "hint": "Upload the marriage certificate of the concerned party."
  },
  "expressions": {
    "props.required": "!(field?.props?.hideField || field?.hide) && field?.props?.defaultRequired"
  },
  "validation": {
    "messages": {
      "required": "This field is required.",
      "invalidfileformat": "\"Marriage Certificate\" only accepts PDF format.",
      "maximumUploadSize": "\"Marriage Certificate\" must be smaller than 500 KB.",
      "minimumUploadSize": "\"Marriage Certificate\" must be at least 1 KB."
    }
  }
}

Common mistakes

  • Setting maximumUploadSize in bytes or MB — the prop is always in KB.
  • Including uppercase variants in allowedFormats (e.g. ["pdf", "PDF"]) — redundant; use lowercase only.
  • Omitting allowedFormats — the component accepts any file type; always restrict explicitly.
  • Using custominternalfileupload when the file must be pushed to an external endpoint — use externalfileupload instead.

Checklist

  • key is UPPER_SNAKE_CASE and unique across the entire form
  • props.label is present, unique, and correctly cased
  • Field is nested at the correct depth: sections > formly-group > block > custominternalfileupload
  • required: false is set (never true)
  • defaultRequired is set
  • expressions["props.required"] is present with the exact required expression
  • allowedFormats is lowercase only (typically ["pdf"] for civil documents)
  • maximumUploadSize is in KB
  • validation.messages has required, invalidfileformat, and maximumUploadSize
  • Validation message text quotes the field label
  • Confirmed the document should go to the CDN — if it must go to an external system, use externalfileupload

On this page