Fix bug in file upload.