You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Description:
63
63
***region**: The region name of your bucket (e.g. 'us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1'). Determines the base url where your objects are stored at (e.g a region of us-west-2 has a base url of s3-us-west-2.amazonaws.com). The default value for this field is an empty (US Standard *). You can go [here](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) for a more complete list/explanation of regions.
64
64
***scheme**: The protocol for the URLs generated to your S3 assets. Can be either 'http' or 'https'. Defaults to 'http' when your ACL is 'public-read' (the default) and 'https' when your ACL is anything else.
65
65
***s3_object_config**
66
-
***bucket**: The bucket where you wish to store your objects. Every object in Amazon S3 is stored in a bucket. If the specified bucket doesn't exist Stapler will attempt to create it. The bucket name will not be interpolated.
66
+
***Bucket**: The bucket where you wish to store your objects. Every object in Amazon S3 is stored in a bucket. If the specified bucket doesn't exist Stapler will attempt to create it. The bucket name will not be interpolated.
67
67
***ACL**: This is a string/array that should be one of the canned access policies that S3 provides (private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control). The default for Stapler is public-read. An associative array (style => permission) may be passed to specify permissions on a per style basis.
68
68
***path**: This is the key under the bucket in which the file will be stored. The URL will be constructed from the bucket and the path. This is what you will want to interpolate. Keys should be unique, like filenames, and despite the fact that S3 (strictly speaking) does not support directories, you can still use a / to separate parts of your file name.
// Define an attachment named 'quux' that stores images remotely in an S3 bucket.
96
96
$this->hasAttachedFile('quux', [
97
97
'styles' => [
@@ -105,7 +105,7 @@ Class Photo extends Eloquent implements StaplerableInterface
105
105
'region' => 'yourBucketRegion'
106
106
],
107
107
's3_object_config' => [
108
-
'bucket' => 'your.s3.bucket'
108
+
'Bucket' => 'your.s3.bucket'
109
109
],
110
110
'default_url' => '/defaults/:style/missing.png',
111
111
'keep_old_files' => true
@@ -135,7 +135,7 @@ $photo->foo = $_FILES['foo'];
135
135
$photo->save();
136
136
137
137
// Regardless of what framework we're using, we can always assign a remote url as an attachment value.
138
-
// This is very useful when working with third party API's such as facebook, twitter, etc.
138
+
// This is very useful when working with third party API's such as facebook, twitter, etc.
139
139
// Note that this feature requires that the CURL extension is included as part of your PHP installation.
140
140
$photo->foo = "http://foo.com/bar.jpg";
141
141
$photo->save();
@@ -184,7 +184,7 @@ $photo->foo = STAPLER_NULL;
184
184
$photo->save();
185
185
```
186
186
187
-
The destroy method is similar, however it doesn't clear out the attachment attributes on the model and doesn't require us to save the record in order to remove uploaded files. It's also filterable; we can pass in array of the syles we want to clear:
187
+
The destroy method is similar, however it doesn't clear out the attachment attributes on the model and doesn't require us to save the record in order to remove uploaded files. It's also filterable; we can pass in array of the syles we want to clear:
188
188
```php
189
189
// Remove all of the attachments's uploaded files (across all styles) from storage.
0 commit comments