@@ -31,6 +31,7 @@ one Datasrouce has one S3 Bucket connection.
31
31
'key' => 'put your s3 access key',
32
32
'secret' => 'put your s3 access secret',
33
33
'bucketName' => 'put your bucket name',
34
+ 'region' => 'put your region',
34
35
],
35
36
],
36
37
```
@@ -42,7 +43,7 @@ Setup new table using s3 connection.
42
43
43
44
```
44
45
<?php
45
- namespace App\Model\Table\ ;
46
+ namespace App\Model\Table;
46
47
47
48
use CakeS3\Datasource\AwsS3Table;
48
49
@@ -52,7 +53,7 @@ class MyS3Table extends AwsS3Table
52
53
}
53
54
```
54
55
55
- For example, declare action of get & show S3 Object.
56
+ For example, declare action of get & show S3 Object.
56
57
57
58
```
58
59
class TopController extends Controller
@@ -61,10 +62,10 @@ class TopController extends Controller
61
62
{
62
63
$MyS3Table = TableRegistry::get('MyS3');
63
64
$content = $MyS3Table->getObjectBody('/path/to/object/file.jpg');
64
-
65
+
65
66
$this->response->type('image/jpeg');
66
67
$this->response->body($content);
67
-
68
+
68
69
return $this->response;
69
70
}
70
71
}
@@ -77,7 +78,7 @@ class TopController extends Controller
77
78
78
79
The methods can call on your S3 Table.
79
80
80
- If You want more detail, go to S3Client document.
81
+ If You want more detail, go to S3Client document.
81
82
[ http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.S3.S3Client.html ] ( http://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.S3.S3Client.html )
82
83
83
84
#### ``` copyObject(string $srcKey, string $destKey, array $options = []) : \Aws\Result ```
0 commit comments