Answered
Control Execution order on one page?
I have been using cflock erroneously thinking it was for this
purpose. Here is my issue; I have an action page that accepts a JPG
from a file upload field of a form then runs the image through a
ImageMagik custom tag twice (once to resize for display and once to
resize/create a thumbnail) THEN the page is meant to upload the 2
images to our remote/backup server.
I have inserted a cfloop that counts to 6000 as a time buffer (see code)
My issue is that the CFFTP starts to send the uploaded file prior to the ImageMagik tag even starting its routine on the image, then is interrupted mid stream. The result is one server has a perfect pair of images, and the other gets a perfect thumb, and a truncated full-size original. This is inconsistant, but annoying.
Is there not a cflock type command to enclose commands on a page so thet will only progress down the template once the previous function has completed? I'm thinking old school "while" type command, but I don't know where to start. Also the file is renamed on upload (to avoid conflicts) so checking if file exists would not yield truth about resize being complete.
I have inserted a cfloop that counts to 6000 as a time buffer (see code)
My issue is that the CFFTP starts to send the uploaded file prior to the ImageMagik tag even starting its routine on the image, then is interrupted mid stream. The result is one server has a perfect pair of images, and the other gets a perfect thumb, and a truncated full-size original. This is inconsistant, but annoying.
Is there not a cflock type command to enclose commands on a page so thet will only progress down the template once the previous function has completed? I'm thinking old school "while" type command, but I don't know where to start. Also the file is renamed on upload (to avoid conflicts) so checking if file exists would not yield truth about resize being complete.