Creating Thumbnails with CFImage Aborting Because of Server Load?
Posted
by nephilite
on Stack Overflow
See other posts from Stack Overflow
or by nephilite
Published on 2010-03-17T03:40:54Z
Indexed on
2010/03/17
16:31 UTC
Read the original article
Hit count: 209
I am uploading in image via a form and I want to, in addition to saving the image, save a variety of thumbnails in both png and jpg format. To do this I am using the code below. The initial image uploads fine but then, after spinning for a moment I get an error of: "Request aborted due to heavy system load." (from my host crystaltech), and none of the thumbnails have made it through. I've tried it with even just one resize (and no converts) and it still fails. What am I doing wrong? This issue is somewhat urgent....Thanks!
`
<cffile action="upload" destination="#Application.filePath#Icons\#app#Icon.png" filefield="Icon" nameconflict="overwrite">
<cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="50%" height="50%" destination="#Application.filePath#Icons\#app#Icon_Half.png" overwrite="yes">
<cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="25%" height="25%" destination="#Application.filePath#Icons\#app#Icon_Quarter.png" overwrite="yes">
<cfimage source="#Application.filePath#Icons\#app#Icon.png" action="convert" destination="#Application.filePath#Icons\#app#Icon.jpg">
<cfimage source="#Application.filePath#Icons\#app#Icon_Half.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Half.jpg">
<cfimage source="#Application.filePath#Icons\#app#Icon_Quarter.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Quarter.jpg">
`
© Stack Overflow or respective owner