Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Jun 30, 2021
1 parent 076b05b commit 0413da0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ $pond = new FilePondField('Avatar');
$pond->setRenamePattern($member->Username . "_avatar.{extension}");
```

You can also use the built-in Filepond renamer like this. Files will be renamed in the frontend before being upload to the server:

```php
$pond = new FilePondField('Avatar');
$pond->setRenameFile('my_avatar_' . time());
```

## Chunked uploads

If you need to upload large videos, you can use `setChunkUploads`. File will be uploaded in chunks (size is computed automatically based on server settings) and then merged on the last upload.
Expand Down
2 changes: 1 addition & 1 deletion src/FilePondField.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function setImageSize($width, $height, $mode = null)
* This is a frontend alternative to setRenamePattern
*
* @link https://pqina.nl/filepond/docs/api/plugins/file-rename/
* @param string $name
* @param string $name The name (extension is added automatically)
* @return $this
*/
public function setRenameFile($name)
Expand Down

0 comments on commit 0413da0

Please sign in to comment.