Skip to content

File upload module error detection in formtools 2 #18

@slimthick

Description

@slimthick

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions