movinf uploadProgressbar to function