Fixed upload functionality which was broken.