# Limit asset type

**URL:** <https://discourse.getcockpit.com/t/limit-asset-type/1298>\
**Category:** Support\
**Created:** [March 26, 2020, 11:40am UTC](https://discourse.getcockpit.com/t/limit-asset-type/1298 "2020-03-26T11:40:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro92](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@alessandro92](https://discourse.getcockpit.com/u/alessandro92)\
**Post date:** [March 26, 2020, 11:40am UTC](https://discourse.getcockpit.com/t/limit-asset-type/1298/1 "2020-03-26T11:40:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [April 3, 2020, 9:05pm UTC](https://discourse.getcockpit.com/t/limit-asset-type/1298/2 "2020-04-03T21:05:12Z")

</div>

> [@alessandro92](#):
>
> mp4

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

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [April 3, 2020, 11:10pm UTC](https://discourse.getcockpit.com/t/limit-asset-type/1298/3 "2020-04-03T23:10:00Z")

</div>

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