Public key upload function edited