You are here

function hook_s3fs_command_params_alter in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x s3fs.api.php \hook_s3fs_command_params_alter()

Alters the S3 parameters returned by getCommandParams().

This impacts calls such obtaining metadata.

Parameters

array $command_params: Associative array of upload settings.

See also

https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html#he...

1 invocation of hook_s3fs_command_params_alter()
S3fsStream::getCommandParams in src/StreamWrapper/S3fsStream.php
Return bucket and key for a command array.

File

./s3fs.api.php, line 125
This file contains no working PHP code.

Code

function hook_s3fs_command_params_alter(array &$command_params) {
  if (strpos($command_params['Key'], 'private/') !== FALSE) {
    $command_params['SSECustomerAlgorithm'] = 'AES256';
    $command_params['SSECustomerKey'] = 'MySecureSecureKey';
  }
}