network – File transfer service through server that is not P2P, encrypt files without letting the server know its contents

A file transfer tool, that works through a middle man server, as the following diagram:

enter image description here

Client A uploads a file to the server, Client B has websocket events that a file is transferring and starts downloading available chunks of the given file.

I would like to encrypt the files without letting the server ever know the file’s contents or how to open it, means the private key must not be known by the server.

But is this even possible? How can I let Client B know of the key that opens the encryption Client A performed?