(fileobj)
return b64encode(md5.digest()).decode('ascii')
Get Content-MD5 value

    All content will be read from the current position to the end of the
    file. The file will be left open with its seek position at the end
    of the file.

    :param fileobj: A file-like object.
    :returns: RFC-1864-compliant Content-MD5 header value.
Get Content-MD5 value
Get Content - MD5 value
def get_content_md5(fileobj):
    """Get Content-MD5 value

    All content will be read from the current position to the end of the
    file. The file will be left open with its seek position at the end
    of the file.

    :param fileobj: A file-like object.
    :returns: RFC-1864-compliant Content-MD5 header value.
    """
    md5 = hashlib.md5()
    for chunk in iter(lambda: fileobj.read(1024 * 1024), b''):
        md5.update(chunk)
    return b64encode(md5.digest()).decode('ascii')
def get_content_md5 ( fileobj ) : md5 = hashlib . md5 ( ) for chunk in iter ( lambda : fileobj . read ( 1024 * 1024 ) , b'' ) : md5 . update ( chunk ) return b64encode ( md5 . digest ( ) ) . decode ( 'ascii' )