import base64


def base64_encode_file(filename):
    """Load a file and return the base64-encoded version of the contents."""
    with open(filename, 'rb') as fid:
        return 'base64,' + base64.b64encode(fid.read()).decode()