Skip to content

IAV-846/feat(file-manager): add DOCX support and refactor content type resolution

salaheddine zidani a demandé de fusionner feature/IAV-846 vers develop

Summary

Extends FileMetadataHelper to support additional file types and refactors the content type resolution logic for better maintainability and correctness.

Changes

  • Replaced if/else chain in determineFileType() with a static immutable Map
  • Added support for video/mp4FileType.VIDEO
  • Added support for application/vnd.openxmlformats-officedocument.wordprocessingml.documentFileType.DOCX
  • Added isBlank() guard alongside null check on content type input
  • Removed default branch from enum switch to enforce exhaustive matching at compile time
  • Clarified DOCUMENT case as a generic fallback for unknown document formats

Notes

  • FileType.DOCUMENT and FileType.DOCX are intentionally kept separate: DOCX maps to its specific MIME type, while DOCUMENT serves as a generic fallback (application/octet-stream) for unrecognized document formats
  • Any future addition to FileType enum will cause a compile-time error if not handled in the switch, preventing silent regressions

Closes IAV-846

Rapports de requête de fusion