The upload form allows users to upload images to the Dark Chest of
Wonders screenshot gallery. No authentication, etc. is performed, so
this needs to be handled by the web server.
The `set_payload` method of the `VariedResponse` class takes care of
rendering the Jinja template or serializing the context object as JSON,
so that no longer needs to be handled by controllers.
The `VariedResponse` class essentially turns the website into a REST
API. When a controller returns a response object that is an instance of
this class, the response representation sent to the user-agent will vary
based on the value of the `Accept` request header. Specifically,
requests containing `Accept: application/json` will receive a
JSON-encoded object, while typical browser requests will get an (X)HTML
document.