MOBILE-427 Refactor moodleUploadFile