IAV-846/feat(file-manager): add DOCX support and refactor content type resolution
Summary
Extends FileMetadataHelper to support additional file types and refactors
the content type resolution logic for better maintainability and correctness.
Changes
- Replaced
if/elsechain indetermineFileType()with a static immutableMap - Added support for
video/mp4→FileType.VIDEO - Added support for
application/vnd.openxmlformats-officedocument.wordprocessingml.document→FileType.DOCX - Added
isBlank()guard alongsidenullcheck on content type input - Removed
defaultbranch from enum switch to enforce exhaustive matching at compile time - Clarified
DOCUMENTcase as a generic fallback for unknown document formats
Notes
-
FileType.DOCUMENTandFileType.DOCXare intentionally kept separate:DOCXmaps to its specific MIME type, whileDOCUMENTserves as a generic fallback (application/octet-stream) for unrecognized document formats - Any future addition to
FileTypeenum will cause a compile-time error if not handled in the switch, preventing silent regressions
Closes IAV-846