fix: store content type at upload time instead of guessing from extension
Previously FileService fell back to extension-based MIME detection, causing TIFF, HEIC, DOCX and other unlisted types to be served as octet-stream (forced download instead of inline display). - Add content_type column to documents (V3 migration) - Store file.getContentType() in DocumentService on upload and file replace - MassImportService uses Files.probeContentType() for local files - DocumentController prefers doc.getContentType() over S3-reported type - FileService: remove extension-based fallback (no longer needed) - DocumentService: replace leftover ResponseStatusException with DomainException Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE documents ADD COLUMN content_type character varying(255);
|
||||
Reference in New Issue
Block a user