☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

max_file_size_message

Table of contents

Description:

This key defines a custom error message that explains why a value has failed the validation criteria from options.max_file_size. This key requires you to define options.max_file_size.

This key has no default.

This key is available for File and URL Inputs.

Appears in:
└── _inputs
    └── *
        ├── File Input
        │   └── options
        │       └── max_file_size_message
        └── URL Input
            └── options
                └── max_file_size_message
Type:
string
Examples:

In this example, we want our team to upload an image using the feature_image Input. This Input limits you to a maximum file size of 750 kB.

Copied to clipboard
_inputs:
  feature_image:
    type: image
    comment: Select the feature image for the banner.
    options:
      max_file_size: 140
      max_file_size_message: For SEO, keep this under 140kB
{
  "_inputs": {
    "feature_image": {
      "type": "image",
      "comment": "Select the feature image for the banner.",
      "options": {
        "max_file_size": 140,
        "max_file_size_message": "For SEO, keep this under 140kB"
      }
    }
  }
}
Open in a new tab