Add function to upload a code