How can I hydrate FileUpload field with a URL

I tried this code but it didn't work

Forms\Components\FileUpload::make('image')
->afterStateHydrated(
    function (FileUpload $component, Closure $get) {
        if ($get('image_id')) {
            $image = Image::find($get('image_id'))->with('storageLocation')->first();
            $component->state([$image->storageLocation->host_name . '/' . $image->file_path]);
        }
    }
),


The image dose show in the table
Was this page helpful?