In firefox 3.0, I couldn't get the file path from a HTML input file
field using javascript.
If i browse and select a file and use javascript to retrieve the full
file path using document.getElementById('id').value, I'm just getting
the file name
for ex: sample.txt
but in earlier versions of firefox we get this as "c:\sample.txt"
I very well know that, getting the full file path is not necessary,
but for my purpose it is.
Is there a way to get the full file path instead of just the filename
from the file input field using javascript.
or I need to use XPCOM, if so how is it ???
I don't know, but I badly need this to be done.......what will be the
workaround for this ???
Thanking You,
Arun
> In firefox 3.0, I couldn't get the file path from a HTML input file
> field using javascript.
>
> If i browse and select a file and use javascript to retrieve the full
> file path using document.getElementById('id').value, I'm just getting
> the file name
>
> for ex: sample.txt
I think this restriction is intentional for security reasons:
https://bugzilla.mozilla.org/show_bug.cgi?id=143220
--
Martin Honnen
http://JavaScript.FAQTs.com/
Yes, if your javascript has UniversalBrowserRead privileges. Of course the user
may not choose to grant that to you.
-Boris