Find the path to the file to be downloaded
I would like to know the paths of certain files that the user is going to upload using my form. I know this is not allowed using JavaScript for privacy reasons, but the system I am building is internal to staff. Maybe there is a JavaScript certificate or something I can put on our servers to say that I can do this? Just like Flash permits a policy file.
I had a quick google and couldn't find anything like the above. What are my options? I mean, how can I get the file paths to download soon, I'll take any implementation idea to get over this. If I can't seem to find a solution, then what I'm trying to build is nice and really buggered !
I thought about asking users to download a text file containing these paths, but this is not very convenient.
Thanks everyone
source to share
Why not open an OpenDialog window? This works well with IE, which you can dictate as you work internally.
<html>
<head>
<script>
function attachFile(){
document.forms[0]['file'].click();
document.getElementById("FileOP").innerHTML += "<br />"+document.forms[0]['file'].value;
return;
}
</script>
</head>
<body>
<form style="margin: 0px; padding: 0px;">
<input type="file" name="file" style="display: none" />
</form>
<a href="javascript:attachFile()">Attach File</a>
<br />
<div id="FileOP">
</div>
</body>
</html>
source to share
If you're open to browser extensions, you can see if Google Gears can . It is available for most browsers and platforms.
source to share