Accept files dropped on a specified element.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { DragDropSource } from 'filepond/extensions/drag-drop-source.js';

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

Configuration

The DragDropSource extension accepts an option object of type DragDropSourceOptions which defines the properties below.

shouldHandleDrop

Determines if a drag event is handled. Defaults to () => true

shouldHandleDrop?: (e: DragEvent) => boolean