(path: str)
Format IPFS CID properly.
Format IPFS CID properly.
Format IPFS CID properly .
def format_ipfs_cid(path: str) -> Optional[str]:
    """Format IPFS CID properly."""
    if path.startswith('Qm'):
        return path

    elif path.startswith('ipfs://'):
        return path.replace('ipfs://', '')
def format_ipfs_cid ( path : str ) -> Optional [ str ] : if path . startswith ( 'Qm' ) : return path elif path . startswith ( 'ipfs://' ) : return path . replace ( 'ipfs://' , '' )