fix upload js code