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).
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.
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?
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 ...
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
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