Improve getting the uploaded filename.

Firefox doesn't have "fakepath," so upload failed there.