[ IE 8 security settings prevents javascript to Miscellaneous ]
Whenever I disable security settings in IE8, in my application, include local directory path when uploading file to a server
is disabled. I don't get the full path of the file. However when I enable it, the application works fine. The security feature is :
Tools -> Internet Options -> security -> Custom level
-> security setting - Internet zone ->Miscellaneous
-> include local directory path when uploading file to a server
Is it possible to detect if this include local directory path when uploading file to a server
is enabled or not using Java Script programatically ?
Answer 1
I'm not aware of a direct way to detect if this URLAction is enabled or not (however, if the site is added to the trusted list, you might fish this via activeX out of the registry, but then you wouldn't need to perform this check in the first place since this option is enabled by default for the trusted sites).
However, when the user selects a file in a file-input, you could simply check if the file-input's value
contains a path (that doesn't start with c:\fakepath\
).
If you find no path or a fakepath then you could alert the user, informing him to enable the include local directory path
, otherwise (you have found a path) continue your normal program.
Hope this helps!