handling of file uploads

This adds support for handling file uploads by Base64-encoding the content and storing it in the session.