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
-[Obtaining Disk Instances](#obtaining-disk-instances)
10
11
-[On-Demand Disks](#on-demand-disks)
@@ -34,7 +35,7 @@ Laravel's filesystem configuration file is located at `config/filesystems.php`.
34
35
35
36
The `local` driver interacts with files stored locally on the server running the Laravel application while the `s3` driver is used to write to Amazon's S3 cloud storage service.
36
37
37
-
> **Note**
38
+
> **Note**
38
39
> You may configure as many disks as you like and may even have multiple disks that use the same driver.
39
40
40
41
<aname="the-local-driver"></a>
@@ -123,7 +124,7 @@ Laravel's Flysystem integrations work great with SFTP; however, a sample configu
123
124
'sftp' => [
124
125
'driver' => 'sftp',
125
126
'host' => env('SFTP_HOST'),
126
-
127
+
127
128
// Settings for basic authentication...
128
129
'username' => env('SFTP_USERNAME'),
129
130
'password' => env('SFTP_PASSWORD'),
@@ -142,6 +143,29 @@ Laravel's Flysystem integrations work great with SFTP; however, a sample configu
142
143
// 'useAgent' => true,
143
144
],
144
145
146
+
<aname="scoped-and-read-only-filesystems"></a>
147
+
### Scoped & Read-Only Filesystems
148
+
149
+
You may create a path scoped instance of any existing filesystem disk by defining a disk that utilizes the `scoped` driver. Scoped disks allow you to define a filesystem where all paths are automatically prefixed with a given path prefix. For example, you may create a disk which scopes your existing `s3` disk to a specific path prefix, and then every file operation using your scoped disk will utilize the specified prefix:
150
+
151
+
```php
152
+
's3-videos' => [
153
+
'driver' => 'scoped',
154
+
'disk' => 's3',
155
+
'prefix' => 'path/to/videos',
156
+
],
157
+
```
158
+
159
+
If you would like to specify that any filesystem disk should be "read-only", you may include the `read-only` configuration option in the disk's configuration array:
0 commit comments