lundi 26 janvier 2015

PHP Image Crop upload cropped image

So I have a scenario where I have to upload a cropped image to AWS.


First, I have the basic image upload working (AWS putbucket and all) so that's not the issue.


I also have the cropping of the image working (using imgAreaSelect) so that is also not the issue.


On the PHP side I also grab the image from the $_FILES['file']['tmp_name'] and create a new cropped image (using code similar to found at http://ift.tt/1CrPSne.


However I need a way to grab the new image created on the last line



imagejpeg($new, $new_filename, 95);


into $_FILES['file']['tmp_name'] in the aws upload here



$s3->putObject(array(
'Body' => fopen($_FILES['file']['tmp_name'], 'r'),
));




Aucun commentaire:

Enregistrer un commentaire