467,907 Members | 1,382 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,907 developers. It's quick & easy.

Form based FILE-UPLOAD help

Hello Everyone,

Is there any way to have the server specify exactly which file the
form is to upload rather then letting the user browse their filesystem
to select an arbitrary file?

Thanks
Jul 20 '05 #1
  • viewed: 1957
Share:
3 Replies
DiscoStu wrote:
Is there any way to have the server specify exactly which file the
form is to upload rather then letting the user browse their filesystem
to select an arbitrary file?


No, you can't tell my browser to upload /etc/passwd
or /var/sql/myPrivateDatabaseOfContacts.

(OK OK, you can use the value attribute like any other input. Opera will
shout security warnings at the user, everything else will ignore it)

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #2
First of all, unless you discover a browser vulnerability you cannot
make the browser upload a local file of your choice to your server. If
you need a specific file uploaded to you, you can check the input file
and display a warning that the user is not uploading the correct file.
It's the user, however, who has the final word. He has to hit the
upload button. :-)

Svetlozar Aleksiev,
Product Manager, Svetlozar Online Ltd.

__________________________________
Svetlozar Online Ltd.
24/7 Hotline: +359 887 87-89-86
Web Site: http://www.svetlozar.com
Jul 20 '05 #3

"DiscoStu" <gr*********@hotmail.com> wrote in message
news:84**************************@posting.google.c om...
Hello Everyone,

Is there any way to have the server specify exactly which file the
form is to upload rather then letting the user browse their filesystem
to select an arbitrary file?


Consider this: Where, on a Mac, would the file "c:\mydir\myfile.txt" be?

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Frank Einstein | last post: by
11 posts views Thread by Jozef | last post: by
2 posts views Thread by lgbjr | last post: by
reply views Thread by Greg | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.