Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently when user clicks Upload button, nothing happens.
Warning should be displayed to the user, similar as it was implemented for the admin page at #1292664: file admin page should validate that the user selected anything before running operations..
I've tried to add extra validation function as below:
/**
* Validate handler for the multiple upload form.
*/
function file_entity_add_upload_multiple_validate($form, &$form_state) {
form_set_error('pud', t('The specified file %name could not be uploaded.', array('%name' => $uploaded_file['name'])));
}
but it didn't work.
Comments