Fileupload
File upload isn't working as expected in panel builder. I get type error when I add image() validation even when I'm uploading an image and when I dd() the data, image column returns null
18 Replies
provide more info/code
did you try another image?
@Leandro Ferreira Yes I have tried other images and got the same results
Just as a test can you try explicitly setting the acceptedFileTypes() to like image/jpg etc.?
I’m wondering if your server just isn’t determining the mime type properly.
@awcodes This is the results
Hmm. This leads me to think it’s something on the server and not filament. Like it can’t infer the mime type or the images you’re testing with aren’t properly encoded.
@awcodes So I'm using form builder in the frontend part of the application and I'm not facing this issue
That’s even more weird then.
The forms package is the same in stand alone or panels. That just doesn’t make sense.
@awcodes Exactly
I should mention I'm building in docker
I wouldn’t think docker would matter. I could be wrong though, I don’t use it. Can you test it locally without the s3 disk, maybe it has something to do with trying to read the temp file from local/s3 bucket and it can’t read it.
Ie, possibly a permissions issue on the bucket.
Laravel
File Uploads | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
@awcodes Same results but I seem to remember something about file permissions error when I implemented the resource
Yea. My brain is just saying it’s something outside of filament itself.
@awcodes I just pushed my code to test on my development domain and I'm getting the same error
Yea. If it’s something with s3 then the app server won’t matter.
Did you try the link I posted to force the tmp uploads to the s3 disk instead of local?
Yes it did! Thank you. Apologies for the late reply
Hi everyone,
How can we set up image uploads locally? Is it possible?
Create a custom disk https://imnhasan.medium.com/laravel-storage-link-up-and-create-disk-b1386d455b7b
Thanks @Dimitar Papazov DEV