pigmentarts
asked on
check file ext
hi i need to check my file ext before i upload, at the moment it does not work??
<!---check its a image--->
<cfset allowfiles = "jpg,jpeg,gif,png">
<cfif listfindnocase(allowfiles, 'form.imag e')>
<cfset error = "Error: An articsdvfdst">
</cfif>
<!---check its a image--->
<cfset allowfiles = "jpg,jpeg,gif,png">
<cfif listfindnocase(allowfiles,
<cfset error = "Error: An articsdvfdst">
</cfif>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks,
used both
doe the cf check first then just in case done,
accept = "image/jpg, image/jpeg, image/gif, image/png">
used both
doe the cf check first then just in case done,
accept = "image/jpg, image/jpeg, image/gif, image/png">
<cffile
action = "upload"
fileField = "form.field"
destination = "you_absolute_path"
nameConflict = "MakeUnique"
accept = "image/jpg, image/jpeg, image/gif, image/png">