Fixes file upload.

Fixes #488