-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Filament Version: 3.3.30
Plugin Version: 3.7.7
PHP Version: 8.3.23
Problem description
When using CuratorPicker with the DefaultPathGenerator, all previously uploaded images are displayed correctly in the picker. However, if you configure CuratorPicker to use DatePathGenerator, images uploaded using this generator do not appear in the picker, even though those images are stored in the database and exist in the correct directory.
Example Code:
With DefaultPathGenerator (images are shown):
CuratorPicker::make('image_id')
->relationship('image', 'id')
->multiple(false)
->directory('uploads/authors')
->acceptedFileTypes(['image/*'])
->preserveFilenames()
->hiddenLabel()
->pathGenerator(DefaultPathGenerator::class)
->required(),With DatePathGenerator (images are not shown):
CuratorPicker::make('image_id')
->relationship('image', 'id')
->multiple(false)
->directory('uploads/authors')
->acceptedFileTypes(['image/*'])
->preserveFilenames()
->hiddenLabel()
->pathGenerator(DatePathGenerator::class)
->required(),Additional details:
- If you first upload an image using DefaultPathGenerator, it is shown in the picker. If you then upload new images with DatePathGenerator, only the image uploaded with DefaultPathGenerator is displayed. The new images uploaded with DatePathGenerator do not appear.
- All images are correctly saved to the database and exist on the filesystem.
Expected behavior
All images uploaded via CuratorPicker should be visible in the picker, regardless of which PathGenerator was used.
Steps to reproduce
- Use CuratorPicker with DefaultPathGenerator and upload an image. The image is shown in the picker.
- Switch to DatePathGenerator and upload a new image.
- Images uploaded with DatePathGenerator are not shown in the picker, but those uploaded with DefaultPathGenerator are still visible.
Screenshots/Images
Reproduction repository
(Not available)
Relevant log output
(No relevant logs available)