The defineFilePond function registers the <file-pond> custom element on the page and returns all <file-pond> elements currently active on the page.
import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
const elements = defineFilePond({
locale,
});
defineFilePond accepts a defineFilePondOptions object which is automatically passed to every existing and newly created <file-pond> element.
The locale option is optional, but without it all FilePond labels will show the locale keys.
defineFilePond internally calls createFilePondExtensionSet to automatically load a default set of extensions.
When called a second time it overwrites the previous defineFilePondOptions object, it won’t attempt to re-register the <file-pond> element.