Add support for file upload

Note: This is an early merge (not complete, not tested) of the covariate file upload story, so that the file upload parts of it can be reused in the csv upload story.
Whitespace not quite perfect :)
<!-- Setting maximum upload size (1073741824 bytes = 1GiB) -->