Tuesday, August 27, 2013

In HTML, file type inputs will not expose full paths to the files they select in modern browsers.

They will just give you the name of the file (for example when you use a FileUpload web forms control in ASP.NET). You may see some JavaScript hacks like this one floating about the web for working around this "problem" ...but this too is coming to an end. These hacks won't work in modern Google Chrome. Don't spend time trying to fight around this circumstance. A file input field should not expose the path to the file selected by it.

No comments:

Post a Comment