acceptedFileTypes reject valid file types
I have this on a Fileupload:
I have tried this as well:
but when I select a .docx file I get an error saying: 'File of invalid type'
15 Replies
Checked Livewire upload rules?
no, I checked the Filament docs!
Laravel
File Uploads | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Find the relevant doc on lw2 if you not on lw3
Not really sure what your point is?
v2 as v3 is still in beta
There is a method on the FileUpload component which I try to use and it does not work as Expected
Livewire
File Uploads | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Stack Overflow
What is a correct MIME type for .docx, .pptx, etc.?
For older *.doc documents, this was enough:
header("Content-Type: application/msword");
What MIME type should I use for new .docx documents? Also, for pptx and xlsx documents?
yes, and as mentioned I have both the mimetype and the extension, and with the extension alone, none worked
If not using the accepted file types, does it upload?
but 'docx' alone should also work IMHO
with this:
I can select the file, but get an error after
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Without this does upload works?
yes
with this it works:
The mime type frol the Laravel documentation does not work, that was my initial try
This is a Microsoft problem. They are notoriously bad with their mime types.
if you look in the laravel documentation you will see that is a difference between mimetypes and mimes. 🙂