def filename_to_url(filename: str) -> Tuple[str, str]:
    """
    Recovers the the url from the encoded filename. Returns it and the ETag
    (which may be ``None``)
    """
    try:
        # If there is an etag, it's everything after the first period
        decoded, etag = filename.split(".", 1)
    except ValueError:
        # Otherwise, use None
        decoded, etag = filename, None

    filename_bytes = decoded.encode('utf-8')
    url_bytes = base64.b64decode(filename_bytes)
    return url_bytes.decode('utf-8'), etag
def filename_to_url(filename: str) -> Tuple[str, str]:
    """
    Recovers the the url from the encoded filename. Returns it and the ETag
    (which may be ``None``)
    """
    try:
        # If there is an etag, it's everything after the first period
        decoded, etag = filename.split(".", 1)
    except ValueError:
        # Otherwise, use None
        decoded, etag = filename, None

    filename_bytes = decoded.encode('utf-8')
    url_bytes = base64.b64decode(filename_bytes)
    return url_bytes.decode('utf-8'), etag
def filename_to_url ( filename : str ) -> Tuple [ str , str ] : try : # If there is an etag, it's everything after the first period decoded , etag = filename . split ( "." , 1 ) except ValueError : # Otherwise, use None decoded , etag = filename , None filename_bytes = decoded . encode ( 'utf-8' ) url_bytes = base64 . b64decode ( filename_bytes ) return url_bytes . decode ( 'utf-8' ) , etag
Recovers the the url from the encoded filename. Returns it and the ETag
    (which may be ``None``)
Recovers the the url from the encoded filename . Returns it and the ETag ( which may be None )