I'm not a stranger to mime types but this is strange. Normally, a text file would have been considered to be of text/plain mime but now, after implementing fileinfo, this type of file is now considered to be "text/x-pascal". I'm a little concerned because I need to be sure that I get the correct mime types set before allowing users to upload with it.
Is there a cheat sheet that will give me all of the "common" mimes as they are interpreted by fileinfo?
Sinan provided a link that lists all of the more common mimes. If you look at this list, you will see that a .txt file is of text/plain mime but in my case, a plain-jane text file is interpreted as text/pascal.
fileinfo
is a "best guess". It analyzes only a portion of the file in order to try to figure out what type the file is, and as such it can be fooled easily enough. Perhaps your file starts with a Pascal comment or keyword such as Project
or Unit
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With