I'm trying to upload my resume to a company's website and I'm getting a C:\fakepath\myfilename, Does this means that my file can't be uploaded to the website? or is it just for security reasons? (I tried uploading with Microsoft Edge and Chrome)
Asked
Active
Viewed 2.9k times
1 Answers
3
When a file is chosen using an <input type="file">
, the real path to the source file is not shown in the input's value
attribute for obvious security reasons. Instead, the filename is shown, with C:\fakepath\
appended to the beginning of it. There are some historical reasons for this quirk, but it is supported across all modern browsers, and in fact is defined in the spec.
So, the browser shows the fake path for security reasons and it will not cause any issue with the file upload functionality. The file upload will work fine.
References:

Deepak-MSFT
- 10,379
- 1
- 12
- 19