diff --git a/README.md b/README.md
index 4d143cb..513a89d 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,12 @@ $form['configurations_files'] = [
         '#title' => $this->t('Configurations'),
         '#description' => $this->t('List of files'),
         '#size' => 50,
-        
+        //Setting an id for the wrapper will activate ajax on the upload,select/unselect and delete button
+        '#theme_wrappers' => [
+          'form_element' =>[
+            '#wrapper_attributes' => ['id' => 'change-this-id-wrapper'],
+          ]
+        ],
         // Like Managed Files, general file validation.
         '#upload_validators' => $validators,
         // Folder to store files.
@@ -54,6 +59,8 @@ $form['configurations_files'] = [
     ];
 ```
 
+
+
 The ``upload_location`` item are mandatory, please choose it wisely 
 to avoid mixing files from another source.
 We don't make any save of the list of uploaded files, 
diff --git a/file_history.module b/file_history.module
index ebb00b1..7e0c75d 100644
--- a/file_history.module
+++ b/file_history.module
@@ -5,7 +5,20 @@
  * Contains file_history.module.
  */
 
+use Drupal\Core\Datetime\Entity\DateFormat;
+use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Messenger\MessengerInterface;
+use Drupal\Core\Render\BubbleableMetadata;
+use Drupal\Core\Render\Element;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Url;
+use Drupal\file\Entity\File;
+use Drupal\file\FileInterface;
+use Drupal\Component\Utility\NestedArray;
+use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Template\Attribute;
 
 /**
  * Implements hook_theme().
@@ -22,12 +35,16 @@ function file_history_theme($existing, $type, $theme, $path) {
 }
 
 /**
- * Form submission handler for upload action on file_history elements.
+ * Form submission handler for upload / remove buttons of managed_file elements.
+ *
+ * @see \Drupal\file\Element\ManagedFile::processManagedFile()
  */
-function file_history_submits($form, FormStateInterface $form_state) {
-
-  // No action is needed here for the upload button,
-  // because file upload on the form are processed by
-  // \Drupal\file_history\Element\FileHistory::valueCallback().
+function file_history_submit($form, FormStateInterface $form_state) {
+  // Set the form to rebuild so that $form is correctly updated in response to
+  // processing the file removal. Since this function did not change $form_state
+  // if the upload button was clicked, a rebuild isn't necessary in that
+  // situation and calling $form_state->disableRedirect() would suffice.
+  // However, we choose to always rebuild, to keep the form processing workflow
+  // consistent between the two buttons.
   $form_state->setRebuild();
 }
diff --git a/src/Element/FileHistory.php b/src/Element/FileHistory.php
index 596942f..afd11a6 100644
--- a/src/Element/FileHistory.php
+++ b/src/Element/FileHistory.php
@@ -2,10 +2,18 @@
 
 namespace Drupal\file_history\Element;
 
+use Drupal\Component\Utility\Crypt;
+use Drupal\Component\Utility\Html;
+use Drupal\Component\Utility\NestedArray;
+use Drupal\Core\Ajax\AjaxResponse;
+use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Render\Element;
 use Drupal\Core\Render\Element\FormElement;
+use Drupal\Core\Site\Settings;
 use Drupal\Core\Url;
 use Drupal\file\Entity\File;
+use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Provides an widget with memory of uploaded file.
@@ -87,6 +95,52 @@ class FileHistory extends FormElement {
     return ['selected' => $values];
   }
 
+  /**
+   * #ajax callback for file_history upload forms.
+   *
+   * @param array $form
+   *   The build form.
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
+   *   The form state.
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The current request.
+   *
+   * @return \Drupal\Core\Ajax\AjaxResponse
+   *   The ajax response of the ajax upload.
+   */
+  public static function uploadAjaxCallback(&$form, FormStateInterface &$form_state, Request $request) {
+    /** @var \Drupal\Core\Render\RendererInterface $renderer */
+    $renderer = \Drupal::service('renderer');
+
+    $form_parents = explode('/', $request->query->get('element_parents'));
+
+    // Sanitize form parents before using them.
+    $form_parents = array_filter($form_parents, [Element::class, 'child']);
+
+    // Retrieve the element to be rendered.
+    $form = NestedArray::getValue($form, $form_parents);
+
+    // Add the special AJAX class if a new file was added.
+    $current_file_count = $form_state->get('file_upload_delta_initial');
+    if (isset($form['#file_upload_delta']) && $current_file_count < $form['#file_upload_delta']) {
+      $form[$current_file_count]['#attributes']['class'][] = 'ajax-new-content';
+    }
+    // Otherwise just add the new content class on a placeholder.
+    else {
+      $form['#suffix'] .= '<span class="ajax-new-content"></span>';
+    }
+
+    $status_messages = ['#type' => 'status_messages'];
+    $form['#prefix'] .= $renderer->renderRoot($status_messages);
+    $output = $renderer->renderRoot($form);
+    $response = new AjaxResponse();
+    $response->setAttachments($form['#attached']);
+
+    return $response->addCommand(new ReplaceCommand(NULL, $output));
+  }
+
+
+
   /**
    * Render API callback: Expands the managed_file element type.
    *
@@ -109,6 +163,29 @@ class FileHistory extends FormElement {
     $parents_prefix = implode('_', $element['#parents']);
     $element['#tree'] = TRUE;
 
+    //Activate ajax only if the form element declared an id for the theme wrapper
+    $ajax_activated = FALSE;
+    if(isset($element['#theme_wrappers']['form_element']['#wrapper_attributes']['id'])){
+      $ajax_wrapper_id = $element['#theme_wrappers']['form_element']['#wrapper_attributes']['id'];
+      $ajax_settings = [
+        'callback' => [get_called_class(), 'uploadAjaxCallback'],
+        'options' => [
+          'query' => [
+            'element_parents' => implode('/', $element['#array_parents']),
+          ],
+        ],
+        'wrapper' => $ajax_wrapper_id,
+        'effect' => 'fade',
+        'progress' => [
+          'type' => $element['#progress_indicator'],
+          'message' => $element['#progress_message'],
+        ],
+      ];
+      $ajax_activated = TRUE;
+    }
+
+
+
     $file_extension_mask = '/./';
     $extension_list = '';
     // Add the extension list to the page as JavaScript settings.
@@ -137,11 +214,16 @@ class FileHistory extends FormElement {
         '#name' => $parents_prefix . '_upload_button',
         '#type' => 'submit',
         '#value' => t('Upload'),
+        //'#attributes' => ['class' => ['js-hide']],
         '#validate' => [],
-        '#submit' => ['file_history_submits'],
+        '#submit' => ['file_history_submit'],
         '#limit_validation_errors' => [],
         '#weight' => -5,
       ];
+
+      if($ajax_activated === TRUE){
+        $element[$parents_prefix . '_upload_button']['#ajax'] = $ajax_settings;
+      }
     }
 
     // Add Table Header.
@@ -240,29 +322,44 @@ class FileHistory extends FormElement {
           $route_target = 'select_file';
         }
 
-        // Add select/unselect submit.
-        $fileRow['operation'][] = [
+        $operation = [
           '#name' => $element['#name'] . '_' . $route_target . '_button_' . $fid,
           '#type' => 'submit',
           '#value' => $link_title,
           '#validate' => [],
-          '#submit' => ['file_history_submits'],
+          '#submit' => ['file_history_submit'],
           '#limit_validation_errors' => [],
           '#weight' => -5,
         ];
+        if($ajax_activated === TRUE){
+          $operation['#ajax'] = $ajax_settings;
+        }
+        // Add select/unselect submit.
+        $fileRow['operation'][] = $operation;
+
+
       }
 
       if (!$isCurrentFile) {
-        // Add delete submit.
-        $fileRow['operation'][] = [
+
+        $operation = [
           '#name' => $element['#name'] . '_delete_button_' . $fid,
           '#type' => 'submit',
           '#value' => t('Delete'),
           '#validate' => [],
-          '#submit' => ['file_history_submits'],
+          '#submit' => ['file_history_submit'],
           '#limit_validation_errors' => [],
           '#weight' => -5,
         ];
+
+        if($ajax_activated === TRUE){
+          $operation['#ajax'] = $ajax_settings;
+        }
+
+        // Add delete submit.
+        $fileRow['operation'][] = $operation;
+
+
       }
 
       if (!$no_download) {
@@ -414,9 +511,9 @@ class FileHistory extends FormElement {
           $status = 'error';
         }
 
-        if (isset($return_status['message']) && $return_status['message'] != '') {
+        /*if (isset($return_status['message']) && $return_status['message'] != '') {
           drupal_set_message($return_status['message'], $status);
-        }
+        }*/
 
         // If validation failed.
         if ($return_status['status'] === FALSE) {
@@ -531,5 +628,4 @@ class FileHistory extends FormElement {
       $file->delete();
     }
   }
-
 }
diff --git a/src/Form/ExempleForm.php b/src/Form/ExempleForm.php
index ce6cee9..474576e 100644
--- a/src/Form/ExempleForm.php
+++ b/src/Form/ExempleForm.php
@@ -45,6 +45,12 @@ class ExempleForm extends ConfigFormBase {
       '#title' => $this->t('Configurations'),
       '#description' => $this->t('List of files'),
       '#size' => 50,
+      //Setting an id for the wrapper will activate ajax on the upload,select/unselect and delete button
+      '#theme_wrappers' => [
+        'form_element' =>[
+          '#wrapper_attributes' => ['id' => 'change-this-id-wrapper'],
+        ]
+      ],
       // Like Managed Files, general file validation.
       '#upload_validators' => $validators,
       // Folder to store files.
