allowed_sources

On this page

Description:

This key defines which sources and DAMs you are allowed to upload to and browse.

Valid values include site-files and the reference key for any DAM connected to your site.

If site-files is omitted from the array, site files will not be available as an asset source for this input.

Appears in:
├── _inputs
│   └── *
│       ├── Rich Text Input
│       │   └── options
│       │       └── allowed_sources
│       └── File Input
│           └── options
│               └── allowed_sources
├── URL Input
│   └── options
│       └── allowed_sources
└── _editables
    ├── content
    │   └── allowed_sources
    ├── block
    │   └── allowed_sources
    └── image
        └── allowed_sources
Type:
Array<allowed_sources[*]>
Items:
[*]string#

This key defines which sources and DAMs you are allowed to upload to and browse.

Valid values include site-files and the reference key for any DAM connected to your site.

If site-files is omitted from the array, site files will not be available as an asset source for this input.

Appears in: allowed_sources.

Show examplesHide examples

In this example, we have configured allowed sources for an Image Input.

Copied to clipboard
_inputs:
  image:
    type: image
    options:
      allowed_sources:
        - site-files
        - my-cloudinary-dam
{
  "_inputs": {
    "image": {
      "type": "image",
      "options": {
        "allowed_sources": [
          "site-files",
          "my-cloudinary-dam"
        ]
      }
    }
  }
}
Examples:

In this example, we have configured allowed sources for an Image Input.

Copied to clipboard
_inputs:
  image:
    type: image
    options:
      allowed_sources:
        - site-files
        - my-cloudinary-dam
{
  "_inputs": {
    "image": {
      "type": "image",
      "options": {
        "allowed_sources": [
          "site-files",
          "my-cloudinary-dam"
        ]
      }
    }
  }
}
Open in a new tab