Skip to content

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

Open
zoidbergx wants to merge 2 commits into
mainfrom
add-support-for-stream-resources
Open

Add support for stream resources in FinfoMimeTypeDetector::detectMimeType()#1
zoidbergx wants to merge 2 commits into
mainfrom
add-support-for-stream-resources

Conversation

@zoidbergx

Copy link
Copy Markdown
Member

copied patch in our fork 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