There is a situation when you want to get the string that is returned by the value attribute of a file upload input <input type=”file” name=”upload”/> under Internet Explorer 8?But the desired full path is not passing in the parameters only name of the file is passing,When you put a simple javascript ie onclick the browse button and get the value in javascript document.form.upload.value and alert the value then you get alert value as “c:\fakepath”
Actually This is because of changes in W3C the real path to the file will be shown only if the page that contains the control is added to the trusted sites collection of the browser

solution for internet explorer

Go to tools ->internet options->security->trusted sites->sites->Enter
http://localhost ->click add and
uncheck require https

solution for firefox>h4>
Go to tools->options->security->Exceptions->add the site http://localhost as trusted site
Now you get the exact values in the upload attribute.?Happy coding

Related Posts

No related posts were found, so here's a consolation prize: Error while initializing hibernate: An AnnotationConfiguration instance is required to use mapping class.