Fix bug in frontend to upload files.