Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<input type='file'> to specify local directory for download?

Status
Not open for further replies.

cadoltt

Programmer
Jun 9, 2005
85
CA
Hello everybody,

I need to download a file from the server. I'd like to invoke in the form the file browser to pick up a directory where to save the file.

I am wondering if I can use the tag <input type='file'> to specify the directory (and optionaly existing file). It works for upload, I can pick a name in the file browser, but when I point to a directory and then type a file name which doesn't exist it gives me an error message, something like this: "C:\foo.txt File not found. Please verify the correct file name was given.".

So is there a way to use the file browser for the download purpose? Or should I use something else?

Thanks,
Alex
 
cadoltt, you can't specify where the file to save on the client's computer. That would be a huge security issue.

____________________________________
Just Imagine.
 
GUJUm0deL,

Thanks for the tip. I should think how to get around this.

Alex
 
I would place some verbiage on the page that instructs the users where they ought to download the file. Other then that, not much you can do.

____________________________________
Just Imagine.
 
GUJUm0deL,

You are right, that's what I thought is the best too.

Alex

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top