code to upload