Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

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

default discord avatar
sccttt2 years 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
    2 years 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
    sccttt2 years ago

    I see, that would work perfect, thank you!

  • default discord avatar
    bhavikaklast year

    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 dedicated engineering support directly from the Payload team..