Add form validation to inform other module to valid the new uploaded files

Created on 18 June 2022, over 2 years ago
Updated 26 April 2023, almost 2 years ago

Problem/Motivation

Some of other modules rely on hook_file_validate() function to valid the new uploaded files. For example the ClamAV module,
https://www.drupal.org/project/clamav/issues/2972967 β†’

I would suggest adding the form validation where this module will inform other module to valid the new uploaded files.

Steps to reproduce

  1. Install this module.
  2. Install the ClamAV module.
  3. Enable Media Bulk Upload DropzoneJS module.
  4. Upload files via Dropzone JS.
  5. The ClamAV scan is bypassed.

Proposed resolution

Add the 'validateForm' function to MediaBulkUploadForm class. In which the file_validate hook implemented by other modules is invoked.

Remaining tasks

Test scripts.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia mingsong πŸ‡¦πŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024