[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

cfx_JpegResize / Coldfusion error scaling and compressing photos

I installed cfx_jpegresize from "chestysoft" on my server today, windows 2003 with cfmx7,....  When I run the below code on my server, it returns an error that it can't find the filename
( filename = "C:\inetpub\idx\ftp\test\small\#originalfiles.name#")
however the code works, it resizes my pics and copies them to another folder, the error occurs once the job is completed. CAn someone look at this and tell me why I'm getting the error and how to fix it? thanks!
-----------------------------------------------------------------------
<cfsetting requesttimeout="480" />
<cfdirectory directory = "C:\inetpub\idx\ftp\test\" name="originalfiles">  
<cfloop query="originalfiles">
<cfx_jpegresize action = "scale"
   source = "C:\inetpub\idx\ftp\test\#originalfiles.name#"
   filename = "C:\inetpub\idx\ftp\test\small\#originalfiles.name#"
   quality = "50"
   factor = "70">
</cfloop>
--------------------------------------------------------------------------
0
Bang-O-Matic
Asked:
Bang-O-Matic
1 Solution
 
siva_sivaCommented:
whether the above code contains cfoutput tag like this

<cfoutput>
<cfsetting requesttimeout="480" />
<cfdirectory directory = "C:\inetpub\idx\ftp\test\" name="originalfiles">  
<cfloop query="originalfiles">
<cfx_jpegresize action = "scale"
   source = "C:\inetpub\idx\ftp\test\#originalfiles.name#"
   filename = "C:\inetpub\idx\ftp\test\small\#originalfiles.name#"
   quality = "50"
   factor = "70">
</cfloop>
</cfoutput>
0
 
js_vaughanCommented:
It might be because of the 'small' file folder.  CFDIRECTORY includes folders in its results.  I've never used cfx_jpegresize, but since the folder doest exists as a picture, that may be throwing the error.  Either make sure your directory has nothing but pictures, or use CFDIRECTYORYs filter attribute like so:

filter="*.jpg|*.jpeg|*.gif|*.png"
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now