def convert_extension_case(url):
    """
    Some records could not resolved because of case sensitivity, where jpg should be JPG or vice versa.
    The function converts uppercase extension to lowercase extension and vice versa.
    :param url: url link to the multimedia file, should ends with file extension.
    :return: url with lower case extension converted to uppercase or vice versa.
    """
    # split at last "." gives ['https://zenodo.org/record/4942307/files/St24_BVV_A1', 'JPG']
    split_url = url.rsplit('.', 1)
    slug = split_url[0]
    extension = split_url[1]
    uppercase_extension = extension.upper()
    lowercase_extension = extension.lower()
    if split_url[1] == uppercase_extension:
        new_url = '{}.{}'.format(slug, lowercase_extension)
    else:
        new_url = '{}.{}'.format(slug, uppercase_extension)
    return new_url