Fixed upload functionality.