Limit asset type

Hello everyone,
i have a repeater block with several blocks together including this one.

{
  "type": "set",
  "label": "Video",
  "options": {
    "fields": [
      {
        "type": "text",
        "name": "width",
        "label": "Width"
      },
      {
        "type": "text",
        "name": "height",
        "label": "Height"
      },
      {
        "type": "asset",
        "name": "video_mp4",
        "label": "Video format MP4"
      },
      {
        "type": "asset",
        "name": "video_webm",
        "label": "Video format WebM"
      }
    ]
  }
},

I would like to limit the type of file I want for the type asset.

Example the type mp4 or type webM.

Thanks

Iā€™m afraid that is not possible, you can only limit the type (by extension) globally and not per field

That seems related to https://github.com/agentejo/cockpit/issues/937, there is a pending PR that may provide the desired functionality.

1 Like