filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.18k stars 2.95k forks source link

File Upload Stuck and Previously Uploaded Images Show as Black Boxes in Wizard (Edit Mode) #14270

Open mstrihi opened 1 month ago

mstrihi commented 1 month ago

Package

filament/filament

Package Version

v3.2.112

Laravel Version

v10.0.0

Livewire Version

v3.0

PHP Version

PHP 8.3

Problem description

image

When using the FilamentPHP Wizard with a FileUpload field in any step after the first, there is a persistent issue when editing a record. Previously uploaded images appear as black boxes, and new image uploads get stuck in the loading state, making it impossible to upload or display files properly.

Additional Observations:
The issue only occurs when the FileUpload field is the only field in a given step of the Wizard. If another field that loads data from the database is added to the same step, both previously uploaded images and new uploads work correctly.

Possible Workaround:
Adding another database-driven field alongside the FileUpload field in the same step resolves the issue temporarily.

Expected behavior

Previously uploaded images should be displayed properly, and new images should upload without being stuck in a loading state.

Steps to reproduce

Steps to Reproduce:

  1. Create a form using FilamentPHP's Wizard with multiple steps.
  2. Add a FileUpload field in a step other than the first one.
  3. Submit a form with an uploaded image.
  4. Edit the form entry and navigate to the step with the FileUpload field.
    • Previously uploaded images will display as black boxes.
    • Any attempt to upload a new image will get stuck in the loading state.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/mstrihi/Fileupload-issue

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

yogesh16 commented 1 month ago

Need more information, Can you provide network log.

mstrihi commented 1 month ago

@yogesh16 still filepond isn't initializing in the wizard on the edit pages. when I add if I added ->previewable(false) then that works.

Works only on first step but if the Fileupload was in step number 4 for example still not initializing only on edit page.

and here is network log image