Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
davellaman #1
<cffile.... accept="image/*"....
<cffile action="UPLOAD"
filefield="file_path1"
destination="#destination#"
nameconflict="MAKEUNIQUE"
accept="image/*">
the code works fine but error is being thrown by coldfusion, i want the error
to be displayed as a simple error message on my site, I however dont know the
paremeters to call the error...
basically i need something simple like... <cfif file is not an image>
but I am unsure of what variable i would use in the if statements
anyone know the answer to this?
davellaman Guest
-
#39216 [NEW]: call_user_func and friends don't accept array($this, "func") callback anymore
From: hannes dot magnusson at gmail dot com Operating system: FreeBSD PHP version: 6CVS-2006-10-20 (CVS) PHP Bug Type: ... -
Can't locate object method "newFromJpeg" via package "GD::Image"
Hi. I'm trying to execute this Perl simple script: -------- #!/usr/bin/perl use GD; my $srcimage = GD::Image->newFromJpeg("image_news.jpg");... -
CFFILE...nameconflict="makeunique"
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?event=view&id=KC.tn_16... -
Making "unalterable" and "locked" image
I've noticed some websites have .jpgs that cannot be dragged and copied to someone's desktop. How do I "lock" an image like that? Also, how can I... -
#25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
From: jordanolsommer at imap dot cc Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: Variables related Bug... -
Stressed_Simon #2
Re: <cffile.... accept="image/*"....
Use cftry and cfcatch. The example will actually catch any error on the upload.
Your other alternative is to not restrict the upload but then handle any
extensions that are not OK. eg keep a list of image extensions that are OK.
After a file is uploaded the following variable 'CFFILE.ClientFileExt' holds
the files extension. So if it is not in the accepted list then show an error
and delete the file!!!
HTH
<cftry>
<cffile action="UPLOAD"
filefield="file_path1"
destination="#destination#"
nameconflict="MAKEUNIQUE"
accept="image/*">
<cfcatch type="any">
<h1>This is not an image!</h1>
</cfcatch>
</cftry>
Stressed_Simon Guest
-
Behnam Aslami #3Behnam Aslami Guest



Reply With Quote


