Is it possible to set the mimetype on the field rather than collection?

default discord avatar
sccttt
11 months ago
3

I understand that I can restrict the mimetype from a collection however I would like to set this on the field itself instead.



E.G. One

Media

collection for the project. An

upload

field which only accepts video files?



I would rather not create another Upload collection if possible

  • discord user avatar
    jmikrut
    Payload Team
    11 months ago

    Right now this is not possible but in the future it could be!



    It currently IS possible on the Relationship field, which functions in largely the same way



    there, you can pass

    filterOptions

    which restricts the options that can be passed

  • default discord avatar
    sccttt
    11 months ago

    I see, that would work perfect, thank you!

  • default discord avatar
    bhavikak
    2 weeks ago

    hello @sccttt i also want to do this can you give me a some reference or example to achive this.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.