Add def upload to pupilcontroller