How to save file with custom form?
I solved like that

$file_name = $file['name'];
$file_get = file_get_contents($file['tmp_name']);
$new_file = file_save_data($file_get, 'public://images/'.$file_name);