title: Receiving an uploaded file in a Coldfusion CFC
body: <p>I have a Backbone front-end that is sending restful calls with an uploaded file to a Coldfusion backend.</p>
  
  <p>I need to know how to 'get at' the file once it has reached my CFC. Unfortunately i have some doubt as to whether the file is being sent at all, my POST goes off fine and returns a basic string from the CFC so i know that is working. </p>
  
  <p>The POST payload looks like this</p>
  
  <pre><code>------WebKitFormBoundarymjCH1xJJ2D10ncj8
  Content-Disposition: form-data; name="qqfile"; filename="Jellyfish.jpg"
  Content-Type: image/jpeg
  
  
  ------WebKitFormBoundarymjCH1xJJ2D10ncj8--
  </code></pre>
  
  <p>I am using jquery FineUploader to send the request.</p>
  
  <p>I am currently using this to try and pick up the file on the CFC end.</p>
  
  <pre><code>&lt;cfcomponent displayname="import"
               rest="true" 
               restPath="/import"&gt;
  
      &lt;cffunction name="import" 
                  access="remote" 
                  httpMethod="POST"
                  produces="application/json"
                  returntype="string"&gt;
  
          &lt;cfset local.testResponse= "Response"&gt;
          &lt;cfset local.testDebug= "Test Debug"&gt;
          &lt;cfif IsDefined("Form.UploadFile") AND Form.UploadFile NEQ ""&gt;
              &lt;cfsavecontent variable="local.debugInfo"&gt;
                  &lt;cfdump var="#local.testDebug#"&gt;
              &lt;/cfsavecontent&gt;
              &lt;cffile action="write" file="c:\Coldfusion10\cfusion\wwwroot\backend\debugInfo.html" output="#local.debugInfo#"&gt;
          &lt;/cfif&gt;
  
          &lt;!--- GET THE FILE SENT WITH THE AJAX CALL AND DO SOMETHING ---&gt;
  
          &lt;!--- Here we should return some JSON that has a success value? ---&gt;
          &lt;cfreturn local.testResponse&gt;
  
      &lt;/cffunction&gt; 
  
  
  &lt;/cfcomponent&gt;
  </code></pre>
  
  <p>I think there is probably some concept i am missing here so im unsure of how to really word this question. Apologies...</p>