3.1 Importer File type error

Hey team, I am trying to get this new inbuilt importer to work and is is hitting an issue where it wont accept any file type... even the generated example file. I've have: 1. Upgraded to 3.1+ 2. run the migrations 3. generated an import using --generate 4. downloaded the example file 5. filled in the data 6. tried to upload 7. tried both csv and txt(tsv) I'm sure it is something stupid simple I am missing.
No description
13 Replies
403gtfo
403gtfo6mo ago
I see another user is having the same issue: https://github.com/filamentphp/filament/issues/10732
GitHub
Filamentphp ImportAction - Unable to import .csv file - File of inv...
Package filament/filament Package Version v3.1.36 Laravel Version v10.40.0 Livewire Version ^3.3 PHP Version PHP 8.2.13 Problem description Cannot upload .csv file that is downloaded with download ...
Dennis Koch
Dennis Koch6mo ago
What's the actual mime-type of the file? I think we just need to add more mime-types for CSV as mentioned in the second comment.
403gtfo
403gtfo5mo ago
Should just be a straight csv. I am using the latest version as well.
403gtfo
403gtfo5mo ago
Oh wow... ok yes. It is totally just in Firefox that it is an issue. Works in chrome and Edge.... that is odd and a huge PITA.
AlexAnder
AlexAnder5mo ago
Hmm, I also have this issue. Not only on firefox, but also on Edge. On Edge its even doesn't provide csv file types to choose from (for upload) I have versions Filament/filament 3.2.17 and pxlbrt/filament-excel 2.3.0 Using Nginx and php8.2-fpm
toeknee
toeknee5mo ago
upload the file to a mime type checker
403gtfo
403gtfo5mo ago
it's ok, I've reverted the the non batch/job back uploader (plugin). better suits my needs.
AlexAnder
AlexAnder5mo ago
I debugged, that uploading csv from my windows pc the mime type is application/vnd.ms-excel Is it possible to change it?
toeknee
toeknee5mo ago
application/vnd.ms-excel is .xls not .csv
AlexAnder
AlexAnder5mo ago
I know, but I created csv with vscode. and uploading this file, firefox response is application/vnd.ms-excel.. Even try to upload the importers example file, the same 😦 I guess, in windows registry is some kind of mime types, which can be changed.. but in organizations network to change that is insane. Better solution is dynamically change the acceptedFileTypes() method
toeknee
toeknee5mo ago
You can change the file mime type easy enough. But you shouldn't change the acceptedFileTypes to accept an invalid file type...
toeknee
toeknee5mo ago
Eric Buchanan
DeviceTests
How To Change MIME Type for a File | DeviceTests
Discover the steps to change a file's MIME type effortlessly. Enhance your website's compatibility and user experience with our expert guide.
AlexAnder
AlexAnder5mo ago
No so easy. The importer doesn't accept even the file witch it provide download as sample. On my Linux it's works, but on Windows no. On windows csv file created with notepad, also uploads as application/vnd.ms-excel. I think, its in windows registry needs to be changed..
Want results from more Discord servers?
Add your server
More Posts