Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File upload module error detection in formtools 2 #18

Open
slimthick opened this issue Aug 10, 2021 · 0 comments
Open

File upload module error detection in formtools 2 #18

slimthick opened this issue Aug 10, 2021 · 0 comments

Comments

@slimthick
Copy link

slimthick commented Aug 10, 2021

I still use form tools 2 and I noticed that sometimes file uploading fails while using the API. If I try to upload an invalid file on the back-end I get a detailed error message but via the API the form is submitted regardless without any explanation.

So, I dug around and found the function that processes file uploads, ft_file_api_process_form_hook in modules\field_type_file\library.php, and I can call error_log() on the message it generated but is there a way to have formtools not submit the form and display why the file upload failed on the form page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant