How to upload unknown file type?

You can use this function as you mentioned and you need to learn your file extensions mime type (in example i add svg and xcf upload ability to wordpress)

add_filter('upload_mimes', 'ability_to_upload');

function ability_to_upload($mimes = array()) {
    $mimes['svg'] = 'image/svg+xml';
    $mimes['xcf'] = 'image/xcf';
    return $mimes;
}

Here is a link for mime types list and file extension checker (you can search by file extension)