Link to home
Start Free TrialLog in
Avatar of paulwhelan
paulwhelan

asked on

further help

at http://oldlook.experts-exchange.com/questions/10219315/force-uploaded-file-to-be-certain-name.html

i load up a file from someones computer onto my server
in the "files of type" drop down menu in the file upload
box how can i make sure that only .txt extensions are searched for?
thanks
Avatar of prakashk021799
prakashk021799

The dialog box is displayed by the browser when the user clikcs on the Browse button. Not all browsers behave in the same way in this case. Some older browsers do not even display the Browse button, forcing the user to enter the full path name of the file being uploaded.

I don't think you can control the options in the dialog box from a CGI script or using any HTML code.

One think you can do is read the file name first and check the extension if it is the wanted one and display an error page it its not.
Avatar of paulwhelan

ASKER

sounds good any idea how to incorporate it into the code in the other question?
thanks
ASKER CERTIFIED SOLUTION
Avatar of prakashk021799
prakashk021799

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
brilliant thanks
actually
it always thinks that its not a .txt file when
i have that as my first clause in checking the file.....