s3 download file using php code example
Example: how to download file from s3 bucket using php
Got it to work by echo'ing out the content-type header before echo'ing the $object body.
$objInfo = $s3->get_object_headers('my_bucket', 'test.jpg');
$obj = $s3->get_object('my_bucket', 'test.jpg');
header('Content-type: ' . $objInfo->header['_info']['content_type']);
echo $obj->body;