Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stream resources in FinfoMimeTypeDetector::detectMimeType() for patching #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zoidbergx
Copy link
Member

copied patch in our fork from @das-peter but only the source file without test class change to allow using this as patch as long as it is not merged in the original repository

comment from @das-peter:
As far as I can tell it is valid to call that method with a resource. As such I think it's worth to attempt to detect the mime-type by the stream contents too.
This should be viable via stream_get_contents() while maintaining the stream pointers using ftell() and fseek().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant