support for handling file uploads

This adds handling of file uploads by Base64-encoding the content and storing it in the session (default behavior).
That would require another action to send the image data. Inlining it just seemed easier for the test.