update upload javascript