User Tools

Site Tools


merkalt:picture_upload

This is an old revision of the document!


When flash will create custom picture it will send it to “jpg_encoder_download.php” with parameter “name” (name=navnelapper.jpg in test variant) Method: POST RequestHeader: “Content-type”, “application/octet-stream” Format of picture: jpeg (.jpg or .jpeg)

there's a sample of php-script (found on site):

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;

}

merkalt/picture_upload.1238257118.txt.gz · Last modified: (external edit)