tpyo / amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5/CURL
1.03k stars 503 forks source link

add header cache control #138

Closed rickzal13 closed 5 years ago

rickzal13 commented 7 years ago

How To Add cache control header ?? can i add code.. private $headers = array( 'Host' => '', 'Date' => '', 'Content-MD5' => '', 'Content-Type' => '','Cache-Control' => '' );

to add header cache-control ?? by mine it's work.. but I need approve you to add this.. what the impact ??

npulidom commented 5 years ago

Set custom headers in $requestHeaders param.

S3::putObject(S3::inputFile(SOME_FILE, false), BUCKET, DEST, S3::ACL_PUBLIC_READ, [], ["Cache-Control" => "max-age=864000"]);