Build a proper response after file upload.

Partial fix for #15