(filename, default='application/octet-stream')
return default
Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
Guess the "Content-Type" of a file.
Guess the Content - Type of a file .
def guess_content_type(filename, default='application/octet-stream'):
    """
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    """
    if filename:
        return mimetypes.guess_type(filename)[0] or default
    return default
def guess_content_type ( filename , default = 'application/octet-stream' ) : if filename : return mimetypes . guess_type ( filename ) [ 0 ] or default return default