File Upload Default Directory

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hash: SHA1


i have a question regarding file uploads. If i do something like a

<input type="file" name="foo">

then the Browser renders a file input field and a button which can be
used to open up a file selecting dialog. Is there any way to change the
default directory which is selected by this file selecting dialog? The
HTML standard has a value-property for file input fields, but the
browsers seem to ignore it. Can this be done by means of HTML and/or
JavaScript? Any help is greatly appreciated.

Best regards,
Jan Thomä
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird -


Re: File Upload Default Directory

Unfortunatly Jan, most browsers will just open the users 'my documents'
folder, or often the last folder they navigated to when doing a file
upload.  In current browser versions, there really is very little you
can do about it short of creating your own activeX control which may or
may not be trusted by users.

Sorry to be the bearer of bad news.

Re: File Upload Default Directory

Quoted text here. Click to load it

Typically, yes.

Not really.

Indeed. Even Opera doesn't support it any more.

In general, you have no idea of what directories, if any, might exist on
_users'_ systems. You cannot even know whether a particular string would be
_syntactically_ correct in any file system.

Quoted text here. Click to load it

Gesundheit! (Hint: In Usenet, PGP signatures are worse than noise.)


Re: File Upload Default Directory

Jukka K. Korpela wrote:

Quoted text here. Click to load it

Actually good point. However for certain applications it still might be

Quoted text here. Click to load it
Thank you for the pointer. Do you have some link which actually explains

Best regards,

Site Timeline