© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
Quin.

FileUpload directly in to the field

protected function getHeaderActions(): array
    {
        return [
            Action::make('terns')
                ->form([
                    FileUpload::make('terms')
                        ->reactive()
                ])
                ->action(function($data) {
                     $filecontent = file_get_contents(storage_path('app/public/' . $data['terms']));
                    unlink(storage_path('app/public/' . $data['terms']));
                })
                ->label('Upload Transaction file')
                ->icon('heroicon-o-folder-open'),
        ];
    }
protected function getHeaderActions(): array
    {
        return [
            Action::make('terns')
                ->form([
                    FileUpload::make('terms')
                        ->reactive()
                ])
                ->action(function($data) {
                     $filecontent = file_get_contents(storage_path('app/public/' . $data['terms']));
                    unlink(storage_path('app/public/' . $data['terms']));
                })
                ->label('Upload Transaction file')
                ->icon('heroicon-o-folder-open'),
        ];
    }


This is my old code and this works just fine but i want the file upload like the screenshot and that it can read the content of the CSV with the terms inside and that it fills out the terms so that you dont have to add it yourself
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Fileupload field
FilamentFFilament / ❓┊help
2y ago
fileUpload download file directly to download folder
FilamentFFilament / ❓┊help
2y ago
FileUpload: Uploading (large files) directly to S3
FilamentFFilament / ❓┊help
2y ago
Reduce the height of the FileUpload field?
FilamentFFilament / ❓┊help
3y ago