How can I encrypt an uploaded file using a public key?

Although this is a NodeJS project, client side encryption part could help.