Get size of file in file upload

I am trying to get the file size from the upload and then save this value to column called size. Any help please how can it be done? 🥺 error: https://flareapp.io/share/47qKNq0m Forms\Components\FileUpload::make('path') ->storeFileNamesIn('name') ->directory('projects') ->afterStateUpdated(function (Closure $set, $state) { $set('size', $state->getSize()); }),
Flare
App\Filament\Resources\ProjectResource\RelationManagers\AttachmentsRelationManager::App\Filament\Resources\ProjectResource\RelationManagers{closure}(): Argument #1 ($set) must be of type Closure, Filament\Forms\Set given, called in /var/www/html/vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 35 - The error occurred at http:/...
Solution:
Change Closure to either Set or callable.
Jump to solution
1 Reply
Solution
awcodes
awcodes13mo ago
Change Closure to either Set or callable.
Want results from more Discord servers?
Add your server