import hashlib
import base64


def get_content_md5(filepath):
    """Given a filepath, return the Content-MD5 for the file's content."""
    md5 = hashlib.md5()
    with open(filepath, 'rb') as f:
        while True:
            data = f.read(65536)
            if not data:
                break
            md5.update(data)
    digest = md5.digest()
    return base64.b64encode(digest).decode('utf-8')