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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to upload Files of known extensions..

Status
Not open for further replies.

anandraman

Programmer
Mar 4, 2001
6
US
I have a FORM containing a File element. I need that FILE element to able to upload files of type "pdf" and "html" only. How do i do it. For example..I want user to see only pdf/html file to upload after he clicks the 'Browse' button.

I currently use

<form ACTION=&quot;Add.asp&quot; METHOD =&quot;POST&quot; ENCTYPE=&quot;multipart/form-data&quot; name=&quot;Addcomp&quot;
ACCEPT = &quot;text/pdf , text/html&quot;>

<input type=&quot;File&quot; name=&quot;sigFile&quot; size=&quot;20&quot; >

This brings up a Choose File Dialog that shows a default of 'All Files' , Pictures [*.jpg] and HTML [ *.htm]

Please help..
 
You cannot change that, they (MS/NN) are a bit touchy about
so called &quot;security&quot;. ALthough the seem to forget that
basic rule of if there is a way out there is also a way in.
To get back to my answer: nothing that has to do with files
can be changed, nothing AT ALL. [bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
I have a PDF and image uploader on a site on our VPN. This uses a cgi script that will only allow files of .pdf, .gif and .jpg to be uploaded although all files are visible in the 'Browse' window.

Let me know if you want more info

Tony Tony
 
No...I've done that myself. All i want is the Browse Window to show only '*.pdf.*.gif&quot; files..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top