#Add Support for uploading image with FileUpload via Clipboard (Pasting copied image)

13 messages · Page 1 of 1 (latest)

subtle oriole
#

As I've noticed, the feature for FilePond's allowPaste is disabled on this generated vendor asset from Filament's.
Is there a way we can enable this easily? Like pasting any image from the active Create Form page, Filament will automatically capture the paste event of an Image type and trigger the file upload? Vanilla FilePond supports uploading via pasting image, so I believe Filament Form's FileUpload could do it too.

vendor/filament/forms/resources/js/components/file-upload.js

median valeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

steep walrus
#

I think it’s disabled because you can have multiple file uploads. Maybe it would be an idea to add this option in a PR.

clever pagoda
#

@steep walrus I am trying to implement this by modifying the file-upload vendor files, but when I build the assets using php artisan filament:assets my changes aren't reflected in the build JS file, am I doing something wrong? The command seems to publish default assets, not the modified one. I need to be able to test it locally before submitting a PR.

steep walrus
clever pagoda
#

Yeah I do have npm run dev running

#

How can I have the changes reflected in the build files?

steep walrus
clever pagoda
#

The project

steep walrus
#

You need to run it in the filament folder. That's where you changed the code, right?

clever pagoda
#

Yes, the vendor/filament/forms/components

steep walrus
clever pagoda
#

Alright will do and get back! Thanks