Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

cfimage resize problem

$
0
0

I have a page that controls our staff directory, including uploading photos of staff members.

 

I have a form with a browse button, and it successfully uploads the picture.  Where it fails is resizing both the photo and the thumbnail.

 

Here's the code I'm using for the resize:

 

<cfset source = "D:\Inetpub\staffnet_test\hep\bios\#lcase(filename)#">

<cfset destination = "D:\Inetpub\staffnet_test\hep\bios\thumbs\#lcase(filename)#">

 

<!--- resize main image --->

<cfimage

    action="resize"

    height="180"

    width="240"

    source="#source#"

    destination="#source#"

    overwrite="yes">

 

<!--- resize thumb --->

<cfimage

    action="resize"

    height="90"

    width="120"

    source="#destination#"

    destination="#destination#"

    overwrite="yes">

 

The "source" location is where the fullsize image is first uploaded.  The first section of code resizes that pic.  The second creates a thumbnail.  It fails with the following error:

An exception occured while trying to write the image.

Ensure that the destination directory exists and that Coldfusion has permission to write to the given path or file. cause : java.io.FileNotFoundException: D:\Inetpub\staffnet_test\hep\bios\kevin.adderly.jpg (The system cannot find the file specified)

 

The error occurred in D:\Inetpub\staffnet_test\hep\admin\hepadmin.cfm: line 100

 

Line 100 is the first overwrite="yes" line.  Any ideas?  I'm running CF 8.01


Viewing all articles
Browse latest Browse all 21760

Trending Articles