a bit more abstraction and hooks for the file upload as preparation for separating the code into an own class