What does C Fakepath

How do you fix the C: \ fakepath?

I am glad that browsers are taking care to save us from intrusive scripts and the like. I'm not happy with IE if you can put something in the browser that enables a simple style fix that looks like a hack attack!

I have a to represent the file input so that I could apply matching styling to the

instead of (again because of IE). Now because of this IE's want to show the user a path with a value that is only guaranteed to keep you on guard and at least scared (if not completely put off ?!) ... MORE IE CRAP!

Anyway, thanks to those who posted the explanation here: IE browser security: appending "fakepath" file path in input [type = "file"] I've put together a little fixer-upper ...

The code below does one or two things - it fixes an lte IE8 bug where the onChange event doesn't fire until the upload field is onBlur, and writes an element with a cleaned filepath that doesn't scare the user.

Shareimprove this answer by Anand Sharma