I'm using the Amazon S3 PHP Class to upload images, but the cache headers aren't being set. Here's the call I'm using.
$s3->putObjectFile(
$image_location,
"bucketname",
$image_file_name,
S3::ACL_PUBLIC_READ,
array(
"Cache-Control" => "max-age=315360000",
"Expires" => gmdate("D, d M Y H:i:s T", strtotime("+5 years"))
)
);
The header response I'm getting for the uploaded image is:
Date: Tue, 04 Oct 2011 04:21:09 GMT x-amz-request-id: B6BAAAAD9B460160 Content-Length: 34319 x-amz-id-2: Oxxx1hIG2nNKfff3vgH/xx/dffF59O/7a1UWrKrgZlju2g/8WvTcBpccYToULbm Last-Modified: Tue, 04 Oct 2011 04:19:20 GMT Server: AmazonS3 ETag: "4846afffbc1a7284fff4a590d5acd6cd" Content-Type: image/jpeg Accept-Ranges: bytes