public function filter_filetype_check($filetype_data, $file, $filename, $mimes)
{
$filename = $this->_sanitize_filename($filename, '.' . pathinfo($filename, PATHINFO_EXTENSION));
$check = $this->_check_uniqueness_with_backend($filename);
// Setting `ext` and `type` to empty will fail the upload because Go doesn't allow unfiltered uploads
// See `_wp_handle_upload()`
if (200 != $check['http_code']) {
$filetype_data['ext'] = '';
$filetype_data['type'] = '';
$filetype_data['proper_filename'] = false;
// Never set this true, which leaves filename changing to dedicated methods in this class
}
return $filetype_data;
}