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

default discord avatar
scctttlast year
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
    last year

    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
    scctttlast year

    I see, that would work perfect, thank you!

  • default discord avatar
    bhavikak10 months ago

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

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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