Add upload support to the CLI and server.