Image upload: validation message on max file size + finish uploading

Support MB Frontend Submission Image upload: validation message on max file size + finish uploading

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42825
    ShemzoneShemzone
    Participant

    Hi
    I have a frontend submission form with an upload image field.
    1 - At this time, if a user tries to upload an image which is over the max file size, there is no message to warn the him. Is there a way to warn the user? I don't find anything in advanced tab about max file size within the validation rules.
    2 - While an image is uploaded by a user, there is nothing to that the image is currently uploading. Most of the time, the users are submitting the form without waiting the uploading is finished. Is there a way to disable the submit button until the lages is finished to upload?

    Thank you

    #42830
    PeterPeter
    Moderator

    Hello,

    Please use the field file_upload and its feature Binding events to display a message when a file is uploaded or when an error occurs.
    https://docs.metabox.io/fields/file-upload/#binding-events

    #42833
    ShemzoneShemzone
    Participant

    Thank you Peter. I will try the binding events.
    Could you confirme 2 things about Mime Type using by file_upload?

    1. Does it work to check Mime type in validation rules?
    2. Mime Type format is for exemple image/jpeg, not only jpeg or jpg?
    #42841
    PeterPeter
    Moderator

    Hello,

    1. No, there is a description in the documentation https://docs.metabox.io/fields/file-upload/
    MIME type of files which we want to show in the Media Library. Note: this is a filter for items in the media popup, it doesn't restrict file types when uploading.

    2. Just the extension. Here is an example:
    'mime_type' => 'application,audio,video,jpeg'

    #43047
    maenomerimaenomeri
    Participant

    Do I just fill in Binding events in the custom settings?

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