Decides what a file is from its contents, using the name only to break ties.
.docx and .xlsx are both ZIP archives, so their magic bytes are identical; the
archive's entries are what tell them apart. The extension alone is never
trusted over the contents — a renamed file is refused rather than misread.
Decides what a file is from its contents, using the name only to break ties.
.docx and .xlsx are both ZIP archives, so their magic bytes are identical; the archive's entries are what tell them apart. The extension alone is never trusted over the contents — a renamed file is refused rather than misread.