function hook_amazons3_save_headers in AmazonS3 7
Allows other modules to change the headers/metadata used when saving an object to S3. See the headers array in the create_object documentation. http://docs.aws.amazon.com/AWSSDKforPHP/latest/#m=AmazonS3/create_object
Parameters
$local_path: The local filesystem path.
$headers: Array of keyed header elements.
Return value
The modified array of configuration items.
1 invocation of hook_amazons3_save_headers()
- AmazonS3StreamWrapper::stream_flush in ./
AmazonS3StreamWrapper.inc - Support for fflush(). Flush current cached stream data to storage.
File
- ./
amazons3.api.php, line 60 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_amazons3_save_headers($local_path, $headers) {
$cache_time = 60 * 60 * 5;
$headers = array(
'content-disposition' => 'attachment; filename=' . basename($local_path),
);
return $headers;
}