I am working on rotate image functionality.
End users has option to rotate the images. I have given ajax call to rotate the image.
I have image URL like http://myServerName/e8520a11e5809268b920138badc416cf
I have tried implementing below steps:
$src = http://myServerName/e8520a11e5809268b920138badc416cf;
$content = PCurl::get($src);
$originalFile = tempnam("/tmp", "tempImageContent");
file_put_contents($originalFile, $content);
$source=imagecreatefromjpeg($originalFile); //only for jpg file. written switch statmt
$rotate = imagerotate($source, 90, 0);
$rotatedTmpFile = tempnam('/tmp', 'rotatedThumbnailImage');
imagejpeg($rotate, $rotatedTmpFile ,100);
Storing it on S3.
But I am facing below error when S3 returns the hash key. And I am trying to see image using http://bucketname/hash_key
<Code>AccessDenied</Code><Message>Access Denied</Message>
Please help!!