pqina / filepond

🌊 A flexible and fun JavaScript file upload library
https://pqina.nl/filepond
MIT License
15.15k stars 825 forks source link

[Feature] Create custom button with custom JS function for file items #900

Open alankoeninger opened 1 year ago

alankoeninger commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe.

Hi, I am using Filepond to allow a user to upload multiple images for a gallery. I would like to be able to add a custom button to each FILE item, which allows me to trigger a custom event. Currently I can't see a way to do that.

The intention is to allow the user to 'highlight' a particular image, which will then later on feature first in their photo gallery. I can already do this with the older 'Slim' JS library, and I send an ajax call to the backend to process this custom request.

Many thanks, A.

Describe the solution you'd like

To be able to add a custom event to each FILE item in Filepond (similiar to the 'remove' or 'edit' buttons).

Describe alternatives you've considered

I've looked through all the docs and also on the web (eg. Stack overflow).

rikschennink commented 1 year ago

This is currently not possible. Only way to do it is write a plugin, it's not super difficult, I'd advise to fork one of the plugins that does add a button (the image edit plugin, and third party download file plugin come to mind)