Installing filepond plugin for file upload
Hey,
how can I install and addon of filepond for previewing pdf files on the file upload. I found the filepond-plugin-pdf-preview package but I dont know how to install this in filament.
5 Replies
Not sure, but have you tried this?
In which file?
Hi Have you found any solution for loading custom/installed filepond plugins ?
i make a work around for this
you need to copy the js file for file-upload component of filament then add the plugin as you want like in the file
Then follow the instruction here to build the file (you need to install all dependecy into your node_module) https://filamentphp.com/docs/3.x/support/assets#asynchronous-alpinejs-components
after that go to your AppServiceProvider modify this function
/**
* Bootstrap any application services.
*/
public function boot(): void
{
FilamentAsset::register([
AlpineComponent::make('file-upload', __DIR__ . '/../../resources/js/dist/file-upload.js')->package("filament/forms")->loadedOnRequest(),
],"filament/forms");
}
then run php artisan filament:assets