I’m working with information in a Drupal module. I added this manner:
$kind['Background_image'] = [ '#type' => 'managed_file', '#title' => t('Image'), '#progress_message' => t('Please wait...'), '#progress_indicator' => 'bar', '#description' => t('Click "Browse..." to select an image to upload.'), '#required' => TRUE, '#upload_validators' => ['file_validate_extensions' => ['jpeg jpg png gif']], '#upload_location' => 'public://backgroundimage/', '#default_value' => $this->choices['Background_image'], ];
Drupal Development Company file is added correctly. As soon as Drupal Development Company file is uploaded a take away button seems permitting to take away Drupal Development Company file and add a brand new one. Drupal Development Company downside is that this button shouldn’t be working. How can I take away an uploaded file?