#ajax on a managed_file custom form field is not working I have a custom Drupal 8 form using a managed_file field with an #ajax callback but the ajax callback is never called (example below). I assume that it's because the managed file field type is already using ajax. Is there a way that I can implement my own ajax callback within my custom module to fire after the managed file's own ajax completes?
 $form['file'] = array(
      '#title' =&gt; t('Image File'),
      '#type' =&gt; 'managed_file',
      '#required' =&gt; TRUE,
      '#upload_location' =&gt; 'private://',
      '#multiple' =&gt; FALSE,

      '#upload_validators'    =&gt; [
        'file_validate_is_image'      =&gt; array(),
        'file_validate_extensions'    =&gt; array('jpg png psd ai bmp eps jpeg pdf tif tiff'),
        'file_validate_size'          =&gt; array(56600000)
      ],

      '#ajax' =&gt; [
        'callback' =&gt; array($this, 'myAjaxCallback'),
        'event' =&gt; 'change',
        'wrapper' =&gt;  'im-area',
        'progress' =&gt; array(
          'type' =&gt; 'throbber',
          'message' =&gt; t('Choose City'),
        ),
      ],
    );
I don't think you can attach multiple ajax callbacks to a form element. But you could override the callback by extending the core element:
/src/Element/MyManagedFile.php
&lt;?php

namespace Drupal\mymodule\Element;

use Drupal\file\Element\ManagedFile;
use Drupal\Core\Ajax\AlertCommand;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\HttpFoundation\Request;

/**
 * My Managed File Element.
 *
 * @FormElement(&quot;my_managed_file&quot;)
 */
class MyManagedFile extends ManagedFile {

 /**
 * {@inheritdoc}
 */
 public static function uploadAjaxCallback(&amp;$form, FormStateInterface &amp;$form_state, Request $request) {
    $response = parent::uploadAjaxCallback($form, $form_state, $request);
    $response-&gt;addCommand(new AlertCommand('Hello!!!'));
    return $response;
  }

}

And then use it in the custom form:
 $form['file'] = array(
      '#title' =&gt; t('Image File'),
      '#type' =&gt; 'my_managed_file',