support for handling file uploads

This adds handling of file uploads by Base64-encoding the content and storing it in the session.
A temporary file is created by `SerializedFile::getAsFile()`, so it actually exists at the location returned by `$this->photo->getPathname()`.