We do it like this.

When I invoke the method I pass the variables like this,

<CFINVOKE COMPONENT="#objPhoto#"

                          METHOD="SavePhoto"

                          argEditMode="#Form.txtEditMode#"

                          argProductID="#Form.txtProductID#"

                          argTitle="#Form.txtTitle#"

                          argFile="#Form.txtFile#"

                          argPhotoID="#Form.txtPhotoID#"

                          returnvariable="arrErrors"

                          >

Then we have a custom tag that does the cffile like this inside the cfc,

<cfif argFile NEQ "">

                        <cftry>

                                    <cf_FCSFileUpload

                                                OutVar="varFileNew"

                                                FileField="Form.txtFile"

                                                Destination="#varPath#images\Photos\"

                                                TableField="File"

                                                TableName="tblPhoto"

                                                WhereClause="WHERE PhotoID='#GetPhotoID()#'"

                                                EditMode="#argEditMode#"

                                                NameConflict="MAKEUNIQUE">

                                    

                                    <cfcatch type="Any">

                                                <cfoutput>#CFCatch.Message#</cfoutput>

                                                <cfabort>

                                    </cfcatch>

                        </cftry>

            </cfif>

Passing the file field like this works fine for us.



Trevor Holm-Laursen

eBusiness Developer, FCS

Direct:  (902)463-5953

FCS (Fundy Computer Services Ltd.)

Tel 877-993-8636

Fax 902-484-5887

Email:  [EMAIL PROTECTED]

Website:  http://www.fcs.ca




[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to