Fix bug of useless spaces in uploaded filename.