views:

10

answers:

2

I currently have it working so it displays a dialogue box to save the image on your computer:

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;
}

just wondered if there is any way to put the file straight into a directory/file without the need of a dialogue box?

like an uploader?

+1  A: 

No, there is not.

Col. Shrapnel
A: 

is there any way of uploading at all using http raw post data?

indievidual
no. using http raw post data has nothing to do with download. you have messed up download and upload. you're using HTTP_RAW_POST_DATA to send a file from user to server (upload) and echo to send it back (download). But it doesn't matter as you cannot save a file on the user's computer without user permission anyway. Period.
Col. Shrapnel