File upload through form type file
Solution

$form["#attributes"] = ["enctype" =&gt; "multipart/form-data"];

$form["base"]["fields"] += [
   "image_section" =&gt; [
    "#type" =&gt; "file",
    "#title" =&gt; "Image",
   ]
];


I solved my problem, as I only reloaded one part of the form, the form generator did not know that there was a file element, so it did not add "multipart enctype / form-data" to the form.

I hope this will help someone in the same situation as me in the future.