Form data and post size limit

Support MB Frontend Submission Form data and post size limit

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #47239
    Nicholas CoxNicholas Cox
    Participant

    Hi

    I have a front end submission form and one of the fields accepts a base64 string for passing to save after the form is submitted. Is there a ajax POST size limit when submitting the form data? I have tried a few MB but any larger than this the form does not submit and just loops. The form field for the base64 string has been excluded from being saved to the database table (as i have custom logic to do something with this during sanitization).

    thanks

    Nick

    #47251
    PeterPeter
    Moderator

    Hello Nick,

    What field type accepts a base64 string? Do you save the field value to a custom table? I think the answer is related to the data type when you create the custom table rather than the field settings.

    #47260
    Nicholas CoxNicholas Cox
    Participant

    Hi

    Its a custom field, its basically a file upload which converts it to a base64 string. Then the idea being when they submit the form i process the base64 image and then save a image path when validating.

    I was asking about the POST size as i am not uploading the files before the form is submitted the PHP post size is increased. I just wondered if there is a limit to what can be sent with metabox? or is this dependent upon the server setup?

    #47275
    PeterPeter
    Moderator

    Hello,

    Yes, there is no limitation about the POST size when submitting the frontend form with Meta Box. It depends on the server configuration, like PHP post_max_size, upload_max_filesize, max_input_vars ...

    #47489
    Nicholas CoxNicholas Cox
    Participant

    yes i was just checking as the form keeping loading for a long time and never times out or displays and error message if the post_max_size etc is exceeded. How do we handle these scenarios using front end forms? is there a way to auto fail validation? thanks

    #47505
    PeterPeter
    Moderator

    Hello,

    As I mentioned above, the frontend form doesn't have any limitations or restrictions. You can use the action hook rwmb_frontend_before_process to add your condition before processing the form. Please follow the documentation to get more details https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooks

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