- Issue created by @jamestarleton
- 🇬🇧United Kingdom longwave UK
Sounds like a duplicate of 🐛 ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip Active , which was committed this week but not released yet?
When passing a filename such as foo.0.bar.baz.pdf
the MIME Type Guesser should be able to return the correct MIME type for this file extension, application/pdf
. Instead, it returns application/octet-stream
.
There is a control flow bug in ExtensionMimeTypeGuesser::guessMimeType
, in which a while loop is exited prematurely because of a "0" in the filename that will evaluate to FALSE.
Instead of exiting, the loop should continue until it reaches the file extension, "pdf" in this case. The string "pdf" would successfully be matched to the correct application/pdf
MIME type.
Upload a file with a name containing a zero between periods, e.g. foo.0.bar.baz.pdf
.
Revise the guessMimeType method to fully iterate over the exploded file name parts.
Revise the guessMimeType method. Develop tests.
TBD.
Active
10.3 ✨
file system
Sounds like a duplicate of 🐛 ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip Active , which was committed this week but not released yet?