Skip to content

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

Open
zoidbergx wants to merge 1 commit into
mainfrom
add-support-for-stream-resources-patch
Open

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

Conversation

@zoidbergx

Copy link
Copy Markdown
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