简体   繁体   中英

How to get full directory path of the file on browse in Firefox and IE using javascript?

I have a javascript interface in which I have a browse button to find and attach a file and then upload it to a different directory. Problem is that once I attach a file i don't get full directory path and file not being found during upload. I was able to adjust IE ver.10 settings to show a full path but not in FF ver.21. I understand this is a security issue that should be in place. How would I retrieve a full path using javascript in IE and FF. Sample code would be really helpful. Thanks in advance.

You do not need full file path from the client browser since it will have nothing to do with the uploaded destination on the server. Many browsers restrict full local path availability due to security concerns. IE will show full path if you add site to "Trusted Sites", but again there is no need for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM