I'm trying to make it so that my script will show test.jpg in an Amazon S3 bucket through php. Here's what I have so far:
$s3 = new AmazonS3($key, $secret);
$objInfo = $s3->get_object_headers('my_bucket', 'test.jpg');
$obj = $s3->get_object('my_bucket', 'test.jpg', array('headers' => array('content-disposition' => $objInfo->header['_info']['content_type'])));
This just dumps out the file data on the page. I think I need to also send the content-disposition header, which I thought was being done in the get_object() method, but it isn't.
Using this SDK - https://aws.amazon.com/sdk-for-php/