update upload js code