Click to See Complete Forum and Search --> : File Download and default directory


mfrank
12-05-2003, 06:40 AM
Hi,

I am new to this site but hope to get an answer on this one.

I am a developer on a large netbank web-application/integration project for a large bank in Denmark.

One of our requirements is the ability for users to download files by the web interface, e.g. account statements.
The requirements says, that the user should be able to personalise settings - e.g. the default directory for storing files in a download.

We are working in a "strict" way - so no active-X or JavaScript is allowed, only pure html.

Internet Explorer example of the requirement:
1. The user clicks a link pointing to a file
2. The browser opens a dialog with the "open" or "save" question
3. The user selects "save"
4. A "Save as" box is displayed. The directory set for this box is typical the same directory as last time the user downloaded anything with the same browser.

So - is it somehow possible to send a directory along with the file, that is used as default for the "save as" box.
I am pretty sure, that no general standard covers this!
But it might be the case, that some "magic tricks" could be used for e.g. Internet Explorer. (covers 95% of our customers)

Best regards
Morten

soccer362001
12-05-2003, 07:48 AM
The easiest way for me to download something is to zip it up.

mfrank
12-05-2003, 07:52 AM
I agree with you - if we could expected the users to have an unzip program. All it professionels have:-)

But we can not make such requirements to our users - no additional stuff on the user-end other than the browser :-(

soccer362001
12-05-2003, 07:56 AM
Well all five of the computers in my house came with an unzip program so I would assume everbody elses computer came with one.

ray326
12-05-2003, 08:03 AM
That's totally browser dependent. As you describe, in general the browsers will remember the last place you downloaded (or did a File/Save As...) something and will initially open the file selection dialog to that location.

I'd respond to that requirement with the fact that is already user configurable dependent on the browser and OS involved. You could also add that the reason things work the way they do is often a matter of end user security. E.g., if a browser allowed that requirement to be satisfied then any web application could potentially replace any file on the user's computer and that would not be a Good Thing. ;)

mfrank
12-05-2003, 08:11 AM
Yes - I am fully aware of that.
The example I gave in the original post was exactly with how IE typically behaves (with the "last location" as you also mentioned)

But my question was - is there a way to do this for IE? (which covers 95% of our customers)

soccer362001
12-05-2003, 08:16 AM
the only other way i know how to do it is with a .exe and i dont know how to do that

Aronya1
12-05-2003, 12:52 PM
I do not think you can do this with HTML. Possibly with something like ActiveX or JavaScript. You are basically attempting to reprogram the user's computer, which could easily prompt a reaction from their antivirus software. You're just asking for trouble.

I am assuming here that you want to do this because the user is ignorant, and won't be able to find the file after they have downloaded it, or something similar.

The requirements says, that the user should be able to personalise settings - e.g. the default directory for storing files in a download.
My suggestion: Provide instructions for the user on how to do just that, and let them make their own changes to their own computers.

ray326
12-05-2003, 01:49 PM
Originally posted by mfrank
Yes - I am fully aware of that.
The example I gave in the original post was exactly with how IE typically behaves (with the "last location" as you also mentioned)

But my question was - is there a way to do this for IE? (which covers 95% of our customers)

No. Any way you could provide that funtionality would require a lot more than HTML.