Plugin
API reference › FilePond › asset › Plugin
Represents the FilePond plugins supported by the widget.
The case value is the global JavaScript identifier under which the plugin registers itself, as expected by
FilePond.registerPlugin().
See also: https://pqina.nl/filepond/docs/api/plugins/.
| Case | Value | Description |
|---|---|---|
FILE_ENCODE | 'FilePondPluginFileEncode' | File Encode plugin, enabled by allowFileEncode: submits files as base64 JSON payloads. |
FILE_POSTER | 'FilePondPluginFilePoster' | File Poster plugin, enabled by allowFilePoster: renders metadata.poster images inside items. |
FILE_RENAME | 'FilePondPluginFileRename' | File Rename plugin, enabled by allowFileRename: renames files through fileRenameFunction. |
FILE_VALIDATE_SIZE | 'FilePondPluginFileValidateSize' | File Validate Size plugin, enabled by allowFileSizeValidation: validates file sizes on the client. |
FILE_VALIDATE_TYPE | 'FilePondPluginFileValidateType' | File Validate Type plugin, enabled by allowFileTypeValidation: validates file types on the client. |
IMAGE_CROP | 'FilePondPluginImageCrop' | Image Crop plugin, enabled by allowImageCrop: crops previews to imageCropAspectRatio. |
IMAGE_EDIT | 'FilePondPluginImageEdit' | Image Edit plugin, enabled by allowImageEdit: opens the Cropper.js editor. |
IMAGE_EXIF_ORIENTATION | 'FilePondPluginImageExifOrientation' | Image EXIF Orientation plugin, enabled by allowImageExifOrientation: corrects orientation from EXIF data. |
IMAGE_PREVIEW | 'FilePondPluginImagePreview' | Image Preview plugin, enabled by allowImagePreview: renders image previews. |
IMAGE_TRANSFORM | 'FilePondPluginImageTransform' | Image Transform plugin, enabled by allowImageTransform: applies crop, resize, and output transforms before submission. |
PDF_PREVIEW | 'FilePondPluginPdfPreview' | PDF Preview plugin, enabled by allowPdfPreview: renders PDF previews. |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
assetClass() | Returns the asset bundle class that delivers the plugin files. | Plugin |
hasStyles() | Returns whether the plugin ships a stylesheet in its distribution. | Plugin |
option() | Returns the FilePond option that enables or disables the plugin. | Plugin |
package() | Returns the npm package name of the plugin. | Plugin |
Method details
Section titled “Method details”assetClass()
Section titled “assetClass() ”public function assetClass(): class-string<yii2\extensions\filepond\asset\AbstractPluginAsset>Returns the asset bundle class that delivers the plugin files.
Returns
class-string<AbstractPluginAsset>: Asset bundle class for the plugin.
hasStyles()
Section titled “hasStyles() ”public function hasStyles(): boolReturns whether the plugin ships a stylesheet in its distribution.
Returns
bool: true when the plugin distribution includes a CSS file.
option()
Section titled “option() ”public function option(): stringReturns the FilePond option that enables or disables the plugin.
Returns
string: FilePond boolean option name.
package()
Section titled “package() ”public function package(): stringReturns the npm package name of the plugin.
Returns
string: Npm package name.