awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
343 stars 89 forks source link

Update CuratorPicker.php #288

Closed vovacorgo closed 1 year ago

vovacorgo commented 1 year ago

Added string field for CuratorPicker

awcodes commented 1 year ago

Are you trying to use UUID's or ULID's?

awcodes commented 1 year ago

UUID an ULID support was added in v3. Currently, I do not have plans to back port it into v2 as it requires changes to a lot of other places too and could potentially break v2.

vovacorgo commented 1 year ago

I do not fully understand you. But explain me, how for example save to database in filament with curator picker to column in edit form - 'image' without that fix. Now that imposible how i understand in that version. For exaple i try to use: CuratorPicker::make('image') ->label(_t('Image')) ->buttonLabel(__('Choose Image')) ->imageResizeTargetHeight(true) ->maxSize(2000) ->directory('RegionalNetworks'),

awcodes commented 1 year ago

The plugin saves the id of the related media item. It doesn't save the path to the image on the record.

So why do you need to save a string instead of an integer. That's what I'm asking.

vovacorgo commented 1 year ago

The plugin saves the id of the related media item. It doesn't save the path to the image on the record.

So why do you need to save a string instead of an integer. That's what I'm asking.

Okay, now i get it. Sorry for disturbing. My problem was in previosly saved record with the string. Curator works normal. Thats was my miss. That was because changing from the base Filament file upload field to curator

abbasmashaddy72 commented 11 months ago

How to get Path instead of id using CuratorPicker

@vovacorgo @awcodes

abbasmashaddy72 commented 11 months ago

How to get Path instead of id using CuratorPicker

@vovacorgo @awcodes

I have Found the Solution by using Media Model