Skip to content

Feature: ODT document preview (uploadable and advertised, but preview says "not available") #2380

Closed

Description

@yannickmonney

Problem

The document upload dialog explicitly advertises ODT ("PDF, DOCX, ODT, XLSX, CSV, TXT up to 100 MB") and .odt uploads succeed — but opening the document shows "Preview not available — This file type cannot be previewed. Please download the file to view its contents." Verified live end-to-end 2026-07-02 with a minimal valid ODT.

Current behavior

  • services/platform/app/features/documents/components/document-preview.tsx:144-162 has branches for PDF, DOCX/DOC, XLSX/XLS, images, and text-based files; .odt falls through to the EmptyState (lines 164-186).
  • services/platform/lib/utils/text-file-types.ts — .odt is in TEXT_FILE_ACCEPT (line ~137, hence uploadable/advertised) but not in any preview extension set, and application/vnd.oasis.opendocument.text is not in TEXT_MIME_TYPES.

Proposed change

Add an ODT branch to the preview: reuse the DOCX rendering path if the converter supports OpenDocument, otherwise extract content.xml text for a basic text preview. Whatever the approach, upload-accept and preview-support lists should be derived from one source so they can't drift apart again.

Acceptance criteria

  • Uploaded .odt renders a readable preview (text content at minimum).
  • Accept list and preview capability come from a shared definition, with a test that flags formats accepted but not previewable.

Activity

  1. added
    feat
    service: platform
    on Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions