I need to loop over a set of image paths to grab, resize and store images from external destinations to S3.
I'm used to calling cfcs to do this like so:
<cfinvoke component="form_img_handler" method="upload" returnvariable="imgSuccess">
<cfinvokeargument name="command" value="upload_search"/>
<cfinvokeargument name="imgPath" value="#results.bildpfad #"/>
<cfinvokeargument name="imgFile" value="#results.bilddateiname#"/>
<cfinvokeargument name="sellerILN" value="#results.iln#"/>
<cfinvokeargument name="cookie" value="#variables.screenWidth#"/>
</cfinvoke>
Question:
If I have to do this 25x, in a loop, would it be better to use cfobject instead of cfinvoke? From what I understand cfinvoke gets instantiated, runs its job and perishes. While cfobjects are there to stay. If so, would it better in the above case to use cfobject? If so, how would I call my upload function (passing parameters) and how do I remove the object once I'm done?
(never used cfobject before...)
Thanks for help!