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

CFFILE tag error

Status
Not open for further replies.

paragvshah

Programmer
Joined
Jan 11, 2001
Messages
109
Location
IN
Hi friends,

I want to accept only 3 formats (.asf, .wmv, .wma)to upload on my site so i am using CFfile tag to validate the file format uploaded by a user. i am using cftry & cfcatch to catch any errors but on some machines the code mentioned below is working and on some machine is giving error.


<cffile
action=&quot;UPLOAD&quot;
accept=&quot;video/x-ms-asf, video/x-ms-wmv, audio/x-ms-wma&quot;
filefield=&quot;movie_name&quot;
destination=&quot;#GetDirectoryFromPath(path)#admin\movie\&quot;
nameconflict=&quot;MAKEUNIQUE&quot;>


When i removed cftry & cfcatch to find the error it shows the following error:


Error Occurred While Processing Request
Error Diagnostic Information
Error processing CFFILE tag

The MIME type of the uploaded file (application/octet-stream) was not accepted by the server. Please verify that you are uploading a file of the appropriate type.

The error occurred while processing an element with a general identifier of (CFFILE), occupying document position (49:8) to (54:34).


Date/Time: 04/12/02 16:13:34
Browser: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Remote Address: 169.254.0.154
HTTP Referrer: Query String: submodule=upload



what could be the reason that same code is accepting the file types and in some machines its giving errors?

parag.
 
The error is saying a format is trying to be upload that it currently does not accept.. Apparently you SHOULD be seeing this error, if not, invalid formats could be uploaded.. either try uploading another format or add that format to the list.
 
Webmigit,

This code is working fine in some machines and in some machines its giving this error. What could be the reason to this?..

Parag.
 
Do you have enctype=&quot;multipart/form-data&quot; in the <form> tag on the upload page?

Just a thought.

Tim P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top