i'm using flash to upload image to php script which saves file on same directory and then uploads it to facebook album. That way i'm getting bunch of disk space used. Is there any way to bypass saving and just upload directly?
Script below:
$upload_dir = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/';
$upload_url = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']) . '/';
$message ="";
$temp_name = $_FILES['Filedata']['tmp_name'];
$file_name = $_FILES['Filedata']['name'];
$file_name = str_replace("","",$file_name);
$file_name = str_replace("'","",$file_name);
$file_path = $upload_dir.$file_name;
move_uploaded_file($temp_name, $file_path);
and then to upload I'm using:
$attachment = array (
'access_token' => $appAccessToken,
'message'=> "NAME: ".$name.");
$attachment['image'] = '@' . realpath($file_path);
Thanks in advance!