Added code for upload