X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffile%2Fsrc%2FElement%2FManagedFile.php;h=95798c6734de0c3f48efe759d61cc382392a3212;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=6f01ee552e979a3539b8e64acb8045c1d4ed5972;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/web/core/modules/file/src/Element/ManagedFile.php b/web/core/modules/file/src/Element/ManagedFile.php index 6f01ee552..95798c673 100644 --- a/web/core/modules/file/src/Element/ManagedFile.php +++ b/web/core/modules/file/src/Element/ManagedFile.php @@ -299,6 +299,10 @@ class ManagedFile extends FormElement { // Add the upload progress callback. $element['upload_button']['#ajax']['progress']['url'] = Url::fromRoute('file.ajax_progress', ['key' => $upload_progress_key]); + + // Set a custom submit event so we can modify the upload progress + // identifier element before the form gets submitted. + $element['upload_button']['#ajax']['event'] = 'fileUpload'; } // The file upload field itself.