Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<INPUT type=file>, Can I send a file only typing text in address box?

Status
Not open for further replies.

Legnus

Programmer
Nov 12, 2002
2
UA
For example there is a form, which sends a filename using <INPUT type=file name=userfile>

And if I type in browser address box:

Can I send a file through form this way? What should be instead of WHAT to identify a file on my disk?

Thank You!
 
Hi mate,

You cannot do this for security reasons. Imagine visiting a site one day and they decide to upload your machines password files. [wink]

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I think the problem is not in that.
I made local HTML and included a form with <INPUT type=file name=userfile value=c:\filename.ext>, so the filename was predefined. And after SUBMIT, browser Opera informed me that a file is being uploaded without my permission - then I can click OK allowing the operation, or cancel.
Internet Explorer ignored the predefined filename, leaving editbox empty.

So here come another question. Can this security be turned off somehow? Standart browser's options (Opera & IE) don't allow this. Well, may be it's right secure thing...
 
Hi mate,

You can try to add your domain to the trusted list under security but I have never tried it with this so have no idea whether it would work or not.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top