From 0413da0e078aae3b6e5ca7a1ad8e061264022fda Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 30 Jun 2021 17:20:36 +0200 Subject: [PATCH] update docs --- README.md | 7 +++++++ src/FilePondField.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 742b2a6..7e89240 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/FilePondField.php b/src/FilePondField.php index 3220491..04dbd9e 100644 --- a/src/FilePondField.php +++ b/src/FilePondField.php @@ -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)