File upload extension detection is broken.
Just thought I would post this here in case anyone else trips on this. I have been successfully using the Maatwebsite Excel loader to read in either csv or excel files in production for a while now. Then suddenly it all stoped working today. No code changes by me, so I figured it must have been an OS Browser thing... but no... it fails on Safari and Chrome in the same way.... after much cursing and swearing, I tracked down the bug. Laravel makes a guess at what type of file you have, based on the contents, it does not believe that just because you said it was a .csv that it is. It's a security feature to stop malicious injection. However, a CSV file with three lines in it is detected as a CSV file, but when it drops to two lines, it is no longer detected as CSV, instead, it is detected as a .txt file, which my software was not expecting to handle. So there you go, one for ages, a very obscure bug, in some, very specific circumstances.
Please or to participate in this conversation.