private function video_amazon_s3::update_headers in Video 6.5
Same name and namespace in other branches
- 6.4 plugins/video_s3/video_s3.lib.inc \video_amazon_s3::update_headers()
1 call to video_amazon_s3::update_headers()
- video_amazon_s3::updateAllExpiresHeaders in plugins/video_s3/video_s3.lib.inc
- Update Expires headers on currently-uploaded files.
File
- plugins/video_s3/video_s3.lib.inc, line 205
- Class file to handle amazon s3 transfers.
Class
- video_amazon_s3
Code
private function update_headers($file, $permission, $headers) {
$filepath = ltrim($file->filepath, '/');
if (strpos('/', $file->filename) !== FALSE) {
$filepath = $file->filename;
}
$headers['Content-Type'] = $file->filemime;
$item = array(
'bucket' => $file->bucket,
'filename' => $filepath,
);
return $this->s3
->copy_object($item, $item, array(
'acl' => $permission,
'headers' => $headers,
))
->isOK();
}