PHP code example of lekoala / silverstripe-filepond
1. Go to this page and download the library: Download lekoala/silverstripe-filepond library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lekoala / silverstripe-filepond example snippets
$pond = new FilePondField('Image');
$pond->addFilePondConfig('allowDrop', false);
$fields->replaceField("Photo", $Photo = new FilePondField("Photo"));
$Photo->setImageSize(300, 200, 'crop');
$pond = new FilePondField('Avatar');
$pond->setRenamePattern("{field}_{date}.{extension}");
$pond = new FilePondField('Avatar');
$pond->setRenamePattern($member->Username . "_avatar.{extension}");
$pond = new FilePondField('Avatar');
$pond->setRenameFile('my_avatar_' . time());
$fields->push($Video = new FilePondField("Video"));
$Video->setChunkUploads(true);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.