© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
22 replies
quantumleaps

disable or fix fileupload validation

I need the accept attribute to be
image/*;capture=camera
image/*;capture=camera
since it's the only attribute combination that gives mobile devices an option to either click a photo, or choose one from files/documents (which is exactly what I need). But when I do that, I can't upload any images as it gives me error : file of invalid type. How can I fix this?

code:
                             Forms\Components\FileUpload::make('product_ean_image_url')
                    ->label('Product EAN Image')
                    ->extraInputAttributes(['accept' => 'image/*; capture=camera'])
                             Forms\Components\FileUpload::make('product_ean_image_url')
                    ->label('Product EAN Image')
                    ->extraInputAttributes(['accept' => 'image/*; capture=camera'])
image.png
Solution
Yes, I understood.

capture="environment"
capture="environment"
says: Use the camera. So you only get camera option.

<input type=“file” accept=“image/*;capture=camera”>
<input type=“file” accept=“image/*;capture=camera”>


Is an invalid accept value and an empty
capture
capture
.

So just omit
capture
capture
?
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

FileUpload Validation Messages
FilamentFFilament / ❓┊help
15mo ago
FileUpload validation message
FilamentFFilament / ❓┊help
2y ago
FileUpload validation not working
FilamentFFilament / ❓┊help
15mo ago