I have been looking all day to get file uploads and handling like the one that is used in the Content editor. When the image is uploaded, it will preview immediately and you can upload a another image. That is what I want in my module too, but I have been looking mad on how to achieve it.
Currently, there is no option to upload another image without submitting the whole form. I know there are multiple images upload modules, but how can I do it just like the Drupal Content (editor)?
$form['file']['image'] = array(
'#type' => 'managed_file',
'#title' => t('Image'),
'#upload_location' => 'public://uploads',