Search code examples
filepond

Filepond set plugin properties


Many Filepond plugins have properties available to modify their behaviour e.g. https://pqina.nl/filepond/docs/patterns/plugins/image-validate-size/#properties.

How do I change them? The Filepond documentation shows how to register a plugin, but not how to customise the properties. I have tried to set them directly on the object:

FilePondPluginImageValidateSize.imageValidateSizeLabelExpectedMinSize = 'Foo';

and looked for a setProperties/setOptions method, which doesn't exist.


Solution

  • You can pass them to the FilePond constructor, for example:

    const myInstance = FilePond.create({
      maxFileSize: '5MB'
    });