Gets the web-accessible URL to a torrent of the Amazon S3 object. The Amazon S3 object’s access
control list settings (ACL) MUST be set to ACL_PUBLIC
for a valid URL to be returned.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the bucket to use. |
|
|
Required |
The file name for the object. |
|
|
Optional |
Specifies that a presigned URL for this request should be returned. May be passed as a number of seconds since UNIX Epoch, or any string compatible with |
Returns
Type |
Description |
---|---|
The torrent URL, with authentication parameters if requested. |
Examples
Get the torrent URL for an object.
// Instantiate the class $s3 = new AmazonS3(); // Get the URL $url = $s3->get_torrent_url('my-bucket', 'video/sample_public.mp4'); // Success? var_dump($url);Result:
string(65) "http://my-bucket.s3.amazonaws.com/video/sample_public.mp4?torrent"
See Also
Source
Method defined in services/s3.class.php | Toggle source view (6 lines) | View on GitHub