Restrict file type with File Upload field

Support General Restrict file type with File Upload fieldResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #38378
    shmaltzshmaltz
    Participant

    I am using the basic file upload field (not Wp media uploader), and want to limit the uploaded filetypes to only JPG and PNG.

    Is this possible?

    #38379
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Currently, it is not possible. There is no option to restrict the file type when uploading with the field type file_upload. You can use another field type like file_advanced to use the WP media upload and filter hook upload_mimes to restrict file type.
    Read more on the documentation https://developer.wordpress.org/reference/hooks/upload_mimes/
    https://docs.metabox.io/fields/file-advanced/

    #42439

    Its kinda of an imporant and basic thing... Are you gonna implement it or what? Jeez!

    #42440

    When using it in the frontend its really useless!

    #43984
    Stephen WalkerStephen Walker
    Participant

    Any plans to add this functionality? It seems essential for any field that allows you to upload to the server. Your primary competitor has had it for at least five years, and this may force me to go to that product (just saying).

    #45679
    shmaltzshmaltz
    Participant

    Still not possible? Cmon...

    #47081
    DaveDave
    Participant

    Yes this is critical for all fields related to uploads

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.