VaQueenB wrote:
> I was able to get the file uploaded fine, but am now
having issues with the ImageNew(). I'm getting this error:
Sorry, my response was unclear. I meant either use option 1
_or_ option 2. For whatever reason, ImageNew understands it is an
image file, even though it has a .tmp file extension (unlike
cfimage).
But since you are using option 1, just replace the
"ImageNew(uploadedFile,350,263)" portion with the full path to your
image file (ie c:\myimages\someImage.jpg). Your "result" variable
will contain the file details, like the serverDirectory and file
name. Use those values to construct the path to the file. Check the
documentation to see all of the available file details:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_f_10.html
Something like this should read in the image. It is not
tested. So watch out for typos and verify it actually _does_
produce a valid file path ;-)
<cfset pathToImage = uploadedFile.serverDirectory
&"\"& uploadedFile.serverFile>
<cfoutput>
debug pathToImage = #pathToImage#<br>
does the file exist? #FileExists(pathToImage)#
</cfoutput>
<cfimage action="read"
source="#pathToImage#"
name="readFile"
>