By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,447 Members | 1,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,447 IT Pros & Developers. It's quick & easy.

Form based FILE-UPLOAD help

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a

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