## What problem does this PR solve?
Feat: detect docx support via header-byte inspection, a further optimize
based on #11684
Not all files with a .doc extension are truly legacy .doc formats, and
some are internally valid .docx documents.
The previous implementation relied on URL suffix checks, which
misclassified these cases and was therefore not reliable.
Doc file could be previewed:
[en2zh.doc](https://github.com/user-attachments/files/23921131/en2zh.doc)
Doc file could not be previewed:
[file-sample_100kB.doc](https://github.com/user-attachments/files/23921134/file-sample_100kB.doc)
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)