How to read a jpg bytearray from a Flash AS3 file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hopewise
    New Member
    • Oct 2012
    • 1

    How to read a jpg bytearray from a Flash AS3 file

    I'm trying to save an image from a Flash AS3 to my server as a jpg file. I found some PHP code to do this, but I want to do this in Ruby. I'm not quite sure how to convert the following code to Ruby. It's mainly the $GLOBALS["HTTP_RAW_POST_ DATA"] part I don't know how to convert.

    Code:
    <?php
    
    if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
    
    // get bytearray $im = $GLOBALS["HTTP_RAW_POST_DATA"];
    
    // save image $f = fopen($_GET['name'], 'wb'); fwrite($f, $jpg); fclose($f);
    
    } else echo 'An error occured.';
    
    ?>
    source:
    >>>Z>>> Removed Broken link from post <<<Z<<<
    Last edited by zmbd; Oct 30 '12, 06:28 AM. Reason: (z)When posting code, please formati it useing the <CODE/> button. (z)Removed broken link from the post.
Working...