Validate the file listsize based on the total size of the files in the list.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { ListSizeValidator } from 'filepond/extensions/list-size-validator.js';

defineFilePond({
    locale,
    extensions: [
        // Add the ListSizeValidator extension
        [ListSizeValidator, {
            maxListSize: '50MB'
        }]
    ]
})

Configuration

The ListSizeValidator extension accepts an option object of type ListSizeValidatorOptions which defines the properties below.

minListSize

Min total file size in bytes or in natural file size. Defaults to 0

minListSize?: string | number

maxListSize

Max total file size in bytes or in natural file size. Defaults to Infinity

maxListSize?: string | number