File Upload Default Directory

  • Thread starter =?ISO-8859-1?Q?Jan_Thom=E4?=
  • Start date
?

=?ISO-8859-1?Q?Jan_Thom=E4?=

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

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ä
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEdB5jF3VbzQNZCsARArOsAJ9iCgnu9Fw95N6lak/aKlJsy/SOywCfbBsl
qyiOCyaQzGEGkWQobmwv6wo=
=Uff7
-----END PGP SIGNATURE-----
 
S

SEOSpecialist

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.
 
J

Jukka K. Korpela

Jan Thomä said:
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.

Typically, yes.
Is there any way to change
the default directory which is selected by this file selecting
dialog?

Not really.
The HTML standard has a value-property for file input fields,
but the browsers seem to ignore it.

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.
iD8DBQFEdB5jF3VbzQNZCsARArOsAJ9iCgnu9Fw95N6lak/aKlJsy/SOywCfbBsl
qyiOCyaQzGEGkWQobmwv6wo=
=Uff7

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

=?ISO-8859-1?Q?Jan_Thom=E4?=

Jukka said:
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.

Actually good point. However for certain applications it still might be
useful.
Gesundheit! (Hint: In Usenet, PGP signatures are worse than noise.)
Thank you for the pointer. Do you have some link which actually explains
why?

Best regards,
Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top