Fixing file upload.

Fixes #248.