Revise code for Data upload