function amazons3_uri_add_bucket in AmazonS3 7.2
Add the default bucket and return a string URL.
Parameters
string $target: The file path to return the URL for.
Return value
string A fully-qualified s3:// URL.
1 call to amazons3_uri_add_bucket()
- amazons3_file_stream_wrapper_uri_normalize_alter in ./
amazons3.module - Implements hook_file_stream_wrapper_uri_normalize_alter().
File
- ./
amazons3.module, line 550 - Hook implementations for the AmazonS3 module.
Code
function amazons3_uri_add_bucket($target) {
$config = StreamWrapperConfiguration::fromDrupalVariables();
$url = new S3Url($config
->getBucket(), $target);
return (string) $url;
}