fix upload function...