F
Filamentβ€’9mo ago
nowak

How to download Export instead of storing on server?

I have created an export header action on my table like this:
->headerActions([
ExportAction::make()
->exporter(GroupOrderExporter::class),
])
->headerActions([
ExportAction::make()
->exporter(GroupOrderExporter::class),
])
This downloads the export straight to public/storage/filament_export/#/files. Is it possible that this would be downloaded to the users device as well, or instead? I don't see anything about this being documented in the Export action documentation: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/export
Solution:
Export actions work with queue unfer the hood, so with their nature they can't be executed immediately to download files. You need to build your own custom action to achieve what you want, probably....
Jump to solution
4 Replies
Solution
Povilas K
Povilas Kβ€’9mo ago
Export actions work with queue unfer the hood, so with their nature they can't be executed immediately to download files. You need to build your own custom action to achieve what you want, probably.
Povilas K
Povilas Kβ€’9mo ago
Perhaps use this package instead, if you export to excel? https://filamentphp.com/plugins/pxlrbt-excel
Filament
Excel Export by Dennis Koch - Filament
Easy Excel exports for Filament Admin
nowak
nowakOPβ€’9mo ago
Thank you! Strange that the queue can't be used for immediate downloads, I would imagine that this is the main use case for people needing to export records, to download them to their devices. I will experiment with custom actions and perhaps use the Excel Export package. Thanks for sharing your tutorial! πŸ™‚
Want results from more Discord servers?
Add your server