Fileupload field
Hi Everyone I have this problem, when I want to upload image is still loading like in the screenshot and if I have images before is showing like blank black.
anyone can help with that?
Many thanks
70 Replies
Forms\Components\FileUpload::make('images')
->multiple()
->label(__('lang.images'))
->directory('projects')
->panelLayout('grid')
->storeFileNamesIn('projects'),
this my code
and this happen only in Edit
console errors?
and this what I get in network but when I copy the link and open it in browser I see the image
this information what I have
Did you recently update filament by any chance and is this in panels or standalone?
Inject makes me think it’s either a Vite issue or a webpack issue and it’s breaking the js.
I tried to update to last version and same problem and I just have filament
Can you share your panel provider?
here the panel
oh not readable sorry just a sec
No worries.
here the file
Are you using the FileUpload or are you using tomato’s plugin where the error is occurring?
normal FileUpload, I use it in other resources where only one image an works fine
this example from another resource
And you haven’t published any views?
Sorry for all the questions, just need to understand the app.
those
Can you run
php artisan about —only=Filament
for me
For some reason the js is breaking just trying to track down why.Command "only=Filament" is not defined.
php artisan about —only=Filament
The "--only" option does not exist.
composer show filament/filament
I used this before
That should definitely exist. Run it without the flag
That looks ok.
Try ‘php artisan filament:assets’
Only other thing I can think of is maybe a browser extension or a plugin causing issues with the js.
the wired thing is in cerate works fine only in Edit I have this issue
At this point if you can share the repo I can dig more tomorrow.
I try it in other browser and same
Yea, at this point I’m out of ideas and would need to be able to see all the code. If you can share the repo I can look into it further tomorrow.
I can add you into repo since is private repo
That’s fine.
Just need to be able to pull it down and recreate it locally.
I added you
But I would start by disabling browser extensions and removing plugins’s one at a time to see if the problem is there.
I’ll let you know after I’ve had time to look at it.
what about rebuild js file?
Wouldn’t hurt to do a npm run build.
you checked this image as well in network?
The url looks ok. But can’t really do anything with that.
Wait, you did run
php artisan storage:link
right?yes already done
Are you on shared hosting by any chance?
If I remove this ->panelLayout('grid')
this output
yes is in shared hosting
but locally has same issue
Ok. I’ll look at it as soon as I can and get back to you.
thank you so much
Which resource is this in?
when I move to first step works
in project resource
when I add empty field in same step aslo works
but I need to switch browser tab
and if only one step works
Weird. Can you try something for me, remove filament/notifications from you composer.json and run composer update.
ok will do it
filament/filament will install the appropriate version of all the packages.
still same after remove notification
so if images was in first step in wizard or in any page with fields works fine only if it's in next steps and without any another fileds not working
this what I notice
Yea. On my phone at the moment, but nothing obvious is standing out to me. Could be a bug but will know more tomorrow.
maybe a bug in the package but I really need to fixed since we can't upload images like that
I hear you. But there’s not more I can do tonight to troubleshoot.
yes I totally understand and thank you so much for your help
when I start uploading something in edit I get this
Sounds like something in filepond.
Odd though. I would expect issues on GitHub if something broke in filepond.
I really don't now but it's work only if there is field inside the step or if the fileupload was in first page
what more weird for me in create works fine but in Edit not
should I replace this file?
No.
for now I just moved the upload file to step 01 until we found soltuion
Hi @awcodes you had any chance to review it?
I already create new public repo has same issue, and submit on github
https://github.com/filamentphp/filament/issues/14270
GitHub
File Upload Stuck and Previously Uploaded Images Show as Black Boxe...
Package filament/filament Package Version v3.2.112 Laravel Version v10.0.0 Livewire Version v3.0 PHP Version PHP 8.3 Problem description When using the FilamentPHP Wizard with a FileUpload field in...
I sent you a PM. I couldn’t install since I don’t have access to 2 of the packages.
@Mstrihi Ok, i can't replicate the issue with the repo you provided. So my guess is something to do with the shared hosting and the server setup.