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

CFFILE - Accept not working

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
Using the Accept parameter in a CFFILE tag to Upload, it throws an error every time no matter what MIME type I use.

If I don't use the Accept parameter, it works fine.

Question: When using Accept, if the file type does not match the MIME type specified in Accept, does it throw an error? Or does it give a specific message?

Hmm: When passing through the filefield variable from a File Input field, it always gets passed as "D:\WINNT\acfd1a.tmp", or another temp filename. Obviously D:\WINNT is the directory on the CF Server, could this be causing the Accept problems? How can I make it pass the actual filename?

Any help is much appreciated.

Miles. Miles Tillinger
SE Net Web Design
vmiles@senet.com.au
 
<CFFILE ACTION=&quot;UPLOAD&quot;
FILEFIELD=&quot;uploadfile&quot;
DESTINATION=&quot;#ImgUploadDir#&quot;
NAMECONFLICT=&quot;makeunique&quot;
ACCEPT=&quot;image/jpeg, image/jpg, image/gif, image/pjpeg&quot;>
<CFSET filename= '#File.ServerFile#'>

This will give the variable &quot;filename&quot; the value(the actual file name)...or it will makeunique if exists.

I use this to upload images, hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top