Topic: Picture upload then resize


Cheesecake87    -- 10-07-2011 @ 5:36 AM
  <cfloop condition="img2done EQ 1">
        <cfif img1done EQ 0>
        
            <cffile action="UPLOAD" filefield="bpicture" destination="#ExpandPath('temp/')#" nameconflict="MAKEUNIQUE">
            
            <cfset bfile = File.ServerFile >
            
            <cfset bpicturer = ImageNew(#ExpandPath('temp/')# & bfile)>
            <cfset ImageResize(bpicturer, 150,"","lanczos")>
        
            <cfimage source="#bpicturer#" action="write" destination="#ExpandPath('temp/#pnameb#')#.jpg" overwrite="yes">
            
            <cfset img1done EQ 1>
        
        <cfelse>
        
                  <cffile action="UPLOAD" filefield="bpicture" destination="#ExpandPath('temp/')#" nameconflict="MAKEUNIQUE">
            
            <cfset afile = File.ServerFile >
               
               <cfset apicturer = ImageNew(#ExpandPath('temp/')# & afile)>
            <cfset ImageResize(apicturer, 150,"","lanczos")>
    
            <cfimage source="#apicturer#" action="write" destination="#ExpandPath('temp/#pnamea#')#.jpg" overwrite="yes">
            
            <cfset img2done EQ 1>
        
        </cfif>
</cfloop>

Is this the correct process ? - it dont seem to work.
Its a multiple file upload, trying to go through each file at a time. Let me know.

This message was edited by Cheesecake87 on 10-7-11 @ 5:36 AM


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=8&Topic=15221