ralouphie / mimey

PHP package for converting file extensions to MIME types and vice versa.
MIT License
324 stars 87 forks source link

Just a heads up #5

Closed RobQuistNL closed 7 years ago

RobQuistNL commented 8 years ago

Mime types are content types. A filename does not always describe the content of a file.

I could upload a .php file and name it .jpg - your class here will think its jpeg. Maybe even let me upload it.

You can (and should) use mime_content_type() to test properly... Just letting you know :)

ralouphie commented 7 years ago

That isn't the goal of this package. This isn't supposed to give you an absolute determination of a MIME type for a given file. It simply gives you the most common MIME type for a given extension and vice versa.

RobQuistNL commented 7 years ago

I know! Thats why I entitled it "heads up". Its not an issue though. Sorry