0 Replies Latest reply on Jul 4, 2011 1:40 PM by shahinyan

    image upload with ColdFusion

    shahinyan Level 1

      Dear friends,


      i am trying to upload an image taken by camera to a server using ColdFusion with no luck.

      1. I am able to take a pic in my application and get a path to it.

      2. I want to pass the data to my cfc via:

      <s:RemoteObject id="photoUploadService" destination="ColdFusion" source="cfc.upload">
                  <s:method name="getUsers" result="getUsersResultHandler(event)"  />
                  <s:method name="insertImageLocation" result="insertImageResultHandler(event)" fault="faultHandler(event)">


      3. In my cfc i have the following:

      <cffunction name="insertImageLocation" access="remote" >
          \    <cfargument name="picToUpload" type="string" required="no">
              <cfset var cffile = "">


      <cffile action="upload" filefield="#arguments.picToUpload#" destination="d:\home\chi.am\wwwroot\testimages" nameConflict="makeUnique" result="upload">



      How do i need to provide file properties to my cfc so it will upload the image? I know that CF needs a form scope variable for formfield property.


      Please help!