private function isUploaded($file): bool
    {
        if (is_string($file)) {
            //We can use native method
            return is_uploaded_file($file);
        }

        if (is_array($file)) {
            return isset($file['tmp_name']) && (
                    is_uploaded_file($file['tmp_name']) || isset($file['uploaded'])
                );
        }

        if ($file instanceof UploadedFileInterface) {
            return empty($file->getError());
        }

        //Not uploaded
        return false;
    }