Repository navigation
fix(files): import finfo in mimetype detection - #66246
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: lazerg <lazerg2@gmail.com>
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
|
/backport to stable35 |
|
This pull request has been automatically locked because it has been closed for more than 7 days. As we do not monitor merged or closed pull requests, we are locking this pull request to prevent further comments from getting lost in the noise. |
Summary
Detection.php lives in
OC\Files\Typebut never importedfinfo, soclass_exists(finfo::class)checkedOC\Files\Type\finfoand was always false.detectString()then fell back to the temp file path, wheregetSecureMimeType()turned types likeimage/vnd.microsoft.iconintoapplication/octet-stream. Addinguse finfo;brings back the finfo path from before #54077. I also added a test that runsdetectString()on an.icofile.Checklist
3. to review, feature component)stable32)AI (if applicable)