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

CFFILE filter for .asf files

Status
Not open for further replies.

ketankshah

IS-IT--Management
Joined
Jan 11, 2001
Messages
121
Location
IN
I want to restrict users to upload only .asf files (Windows Media Player files) through CFFILE tag. What value should I use in the "accept" parameter so that user will not be able to upload files with any other extension.?

Thanks

Ketan
 
You have a few options, you can either find it out there somewhere (see for a few sites) or see what MIME type your computer is using to associate those files with your application, or you can test it.

To test, get a .asf file and upload it. When you manipulate it also print out
Code:
#FILE.ContentType#
. This tells you the MIME type of the file you just uploaded.

Be warned, different browsers on different operating systems (especially check on a Mac) will upload with different MIME types. Some completely standard browsers will also sometimes not send the MIME type with the upload, so make sure you're prepared for that. You really need to check a lot of configurations to make sure you catch all of them. Good luck!
 
Thank you very much for a quick response. I will check this out.

Ketan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top