2 Replies Latest reply on May 27, 2009 12:16 PM by MattConnollyMC

    CF equivalent of PHPs $GLOBALS["HTTP_RAW_POST_DATA"]


      I am working on a Flash project that will export a jpg image to the user. I found a PHP script that does what I need, but I am having trouble converting it to ColdFusion. The part that I am stuck on is finding a ColdFusion equivalent of $GLOBALS["HTTP_RAW_POST_DATA"]. I have included the original PHP script I used as well as the ColdFusion part as I have it to this point. Any help would be greatly appreciated.


      Original PHP Script...


      if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))
      // get bytearray
      $jpg = $GLOBALS["HTTP_RAW_POST_DATA"];


      // add headers for download dialog-box
      header('Content-Type: image/jpeg');
      header("Content-Disposition: attachment; filename=".$_GET['name']);
      echo $jpg;



      What I tried in CF...


      <cfset x = GetHttpRequestData()>


      <cfcontent type="image/jpeg">
      <cfheader name="Content-Disposition" value="attachment; filename=#url.name#">