/**
  * Override the S3 Put Object arguments
  *
  * @return bool
  */
 public function stream_flush()
 {
     // Set the ACL as public by default
     $this->params['ACL'] = Amazon_S3_And_CloudFront::DEFAULT_ACL;
     $this->params = apply_filters('wpos3_stream_flush_params', $this->params);
     return parent::stream_flush();
 }
 public function stream_flush()
 {
     /// Expires:
     if (defined('S3_UPLOADS_HTTP_EXPIRES')) {
         $this->params['Expires'] = S3_UPLOADS_HTTP_EXPIRES;
     }
     // Cache-Control:
     if (defined('S3_UPLOADS_HTTP_CACHE_CONTROL')) {
         if (is_numeric(S3_UPLOADS_HTTP_CACHE_CONTROL)) {
             $this->params['CacheControl'] = 'max-age=' . S3_UPLOADS_HTTP_CACHE_CONTROL;
         } else {
             $this->params['CacheControl'] = S3_UPLOADS_HTTP_CACHE_CONTROL;
         }
     }
     /**
      * Filter the parameters passed to S3
      * Theses are the parameters passed to S3Client::putObject()
      * See; http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.S3Client.html#_putObject
      *
      * @param array $params S3Client::putObject paramteres.
      */
     $this->params = apply_filters('s3_uploads_putObject_params', $this->params);
     return parent::stream_flush();
 }