Customize file upload processing

I am trying to use my own service class method for processing and storing images on my resource, as I am using laravel + inertia + vue3 offering the same CRUD operations for one of my resources. Since I am already using my own service class for image file processing and storage, I would like to reuse this logic when uploading image files through Filament.

Is it possible to parse the uploaded file to a defined method, something like this:
FileUpload::make('picture')
    ->image()
    ->maxSize(5120)
    ->saveUploadedFileUsing(function (FileUpload $field, $file, $record) {
        return GroupService::processAndStoreGroupPicture($file, $record->name);

Or what would be the most appropriate way of doing this with Filament?
Solution
Did you figure this out? Running into the same challenge.
Was this page helpful?