Convert a DataTransfer into a File tree.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { DataTransferLoader } from 'filepond/extensions/data-transfer-loader.js';

defineFilePond({
    locale,
    extensions: [
        // Add the DataTransferLoader extension
        DataTransferLoader
    ]
})

Configuration

The DataTransferLoader extension accepts an option object of type DataTransferLoaderOptions which defines the properties below.

perceivedPerformance

Should we show the progress indicator for a minimum amount of time, configure with PerceivedPerformanceOptions. By default isn’t set, when set to true the following settings are used:

{
minDuration: 500,
maxDuration: 750,
minStep: 50,
maxStep: 150
}
perceivedPerformance?: boolean | PerceivedPerformanceOptions

actionLoad

Action to run to trigger the load operation, defaults to 'load'

actionLoad?: string

actionAbort

Action to run to trigger the abort operation, defaults to 'abort'

actionAbort?: string

mode

How we deal with directory structures, defaults to 'flatten'. Currently doesn’t support other values.

mode: "flatten"