fix upload redirect bug