Skip to content

Commit cd0347b

Browse files
committed
Upd README.md
1 parent 172deb0 commit cd0347b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,14 @@ public function actions()
223223

224224
## Manually create a file
225225

226-
226+
- From path
227+
228+
```php
229+
Yii::$app->fileManager->create('/path/to/file', $ownerId, $model->getFileOwnerType($attribute), true)
230+
```
231+
232+
- From URL
233+
234+
```php
235+
Yii::$app->fileManager->create('http://…/path/to/file', $ownerId, $model->getFileOwnerType($attribute), true)
236+
```

0 commit comments

Comments
 (0)