3

While applying to a job, I uploaded a resume to a recruiting website:

C:\myname\an\embarrassing\path\to\my\resume.pdf

Can the website see the file path of my uploaded document?

Jackspace
  • 105
  • 4
rvictordelta
  • 145
  • 1
  • 1
  • 5

2 Answers2

2

No! Almost all modern browsers change the path to something like C:\fakepath\filename.ext in order to protect your privacy.

Xander
  • 35,525
  • 27
  • 113
  • 141
Aman Aryan
  • 44
  • 1
  • 1
    @forest It's not included in the upload, but the (fake) path can be read by Javascript as the `.value` of the input element. –  Jan 09 '19 at 03:44
2

Browser security controls prevent client-side scripts from accessing the full path of local resources. JS running inside the context of a browser by default has no access to the file system. HTML5 provides an API as mentioned in this answer but apparently anonymizes/sanitize output at the browser level.

hax
  • 3,851
  • 1
  • 16
  • 34