Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | ~3.2 |
Some file uploads are failing due to .txt files not being recognized as text
test.txt hello
>>> Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser::getInstance()->guess('pathto/test.txt');
=> "text/plain"
test2.txt HKF9-JX9RXE-U43A4X
>>> Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser::getInstance()->guess('pathto/test2.txt');
=> "application/zlib"
Double checking with bash (osx)
$ file --mime-type pathto/test2.txt
pathto/test2.txt: text/plain
a few more tests:
HK
-> "application/zlib"H
-> "application/octet-stream"
Expecting text/plain