Using wp_handle_upload() to Direct Specific Path by Using $overrides

You need to specify a list of allowed mime types.

You could make it easy by just getting the allowed mime types like:

$file = $_FILES['the-file'];
$upload_file = wp_handle_upload($file, array(
    'test_form' => false,
    'mimes' => get_allowed_mime_types()
));

If you look at the codex for Default allowed mime types, you could manually specify which ever mime types you want in that format.

An example would be like this answer.

tech