Loading inc/class-s3-uploads-stream-wrapper.php +16 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,22 @@ class S3_Uploads_Stream_Wrapper extends Aws\S3\StreamWrapper { // Override public function stream_flush() { // Add some HTTP headers which can be defined in wp-config.php // Expires: if ( defined( 'S3_UPLOADS_EXPIRES' ) ) { $this->params[ 'Expires' ] = S3_UPLOADS_EXPIRES; } // Cache-Control: if ( defined( 'S3_UPLOADS_CACHE_CONTROL' ) ) { if ( is_numeric( S3_UPLOADS_CACHE_CONTROL ) ) { $this->params[ 'CacheControl' ] = 'max-age='. S3_UPLOADS_CACHE_CONTROL; } else { $this->params[ 'CacheControl' ] = S3_UPLOADS_CACHE_CONTROL; } } // Theses are the parameters passed to S3Client::putObject() // http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.S3Client.html#_putObject $this->params = apply_filters( 's3_uploads_putObject_params', $this->params ); Loading Loading
inc/class-s3-uploads-stream-wrapper.php +16 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,22 @@ class S3_Uploads_Stream_Wrapper extends Aws\S3\StreamWrapper { // Override public function stream_flush() { // Add some HTTP headers which can be defined in wp-config.php // Expires: if ( defined( 'S3_UPLOADS_EXPIRES' ) ) { $this->params[ 'Expires' ] = S3_UPLOADS_EXPIRES; } // Cache-Control: if ( defined( 'S3_UPLOADS_CACHE_CONTROL' ) ) { if ( is_numeric( S3_UPLOADS_CACHE_CONTROL ) ) { $this->params[ 'CacheControl' ] = 'max-age='. S3_UPLOADS_CACHE_CONTROL; } else { $this->params[ 'CacheControl' ] = S3_UPLOADS_CACHE_CONTROL; } } // Theses are the parameters passed to S3Client::putObject() // http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.S3Client.html#_putObject $this->params = apply_filters( 's3_uploads_putObject_params', $this->params ); Loading