Skip to content

Commit ea414b3

Browse files
committed
fix: update fs docs
1 parent 8552212 commit ea414b3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/docs/utils/fs.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,21 @@ One amazing thing about the `upload()` method is that it can detect the file typ
173173
```php
174174
$uploaded = storage()->upload('fileToUpload', 'path/to/uploads', [
175175
'maxSize' => 1024 * 1024, // 1MB
176-
'allowedTypes' => 'image',
176+
'allowedTypes' => ['image'],
177177
'allowedExtensions' => ['jpg', 'png', 'gif'],
178-
'rename' => true,
179-
'force' => true,
180-
'overwrite' => false,
181178
'validate' => true,
179+
'mode' => 0777,
180+
'rename' => false,
181+
'recursive' => false,
182+
'overwrite' => false,
182183
]);
183184
```
184185

185186
This is a list of config options for the `upload()` method:
186187

187188
| Config Name | Description | Possible Values |
188189
| :----------- | :----------------------------------------------------------- | ------------------------------------------------------------------------------------: |
189-
| force | If `true`, Leaf will create the folder if it doesn't exist | `true`, `false` |
190+
| mode | Permissions to create your destination folder if it doesn't exist | Any permissions accepted by mkdir() |
190191
| overwrite | If `true`, Leaf will overwrite the file if it already exists | `true`, `false` |
191192
| rename | If `true`, Leaf will rename the file if it already exists | `true`, `false` |
192193
| validate | If `true`, Leaf will validate the file before uploading | `true`, `false` |

0 commit comments

Comments
 (0)