Problem/Motivation
Steps to reproduce:
Create a form with a managed_file form element like this:
public function buildForm(array $form, FormStateInterface $form_state) {
$form['upload'] = ['#title' => $this->t('Upload file'),
'#type' => 'managed_file',
'#upload_location' => 'private://managed/',
'#upload_validators' => ['file_validate_extensions' => ['pdf'],],
'#required' => TRUE,
'#multiple' => TRUE,
];
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Upload file'),
);
return $form;
}When you go to the page and select the files to upload the first file is uploaded fine, but the others are uploaded twice, if you go the upload folder you will see it.
Proposed resolution
???
Remaining tasks
???
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #10
quietone commented@adriancid, thank you for reporting this problem.
I tested this on 9.3.x and was not able to reproduce this error. I followed the steps given in the Issue Summary.
Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!