Start code for upload (but is not working)