Powered by Zoomin Software. For more details please contactZoomin

Develop with FastTrack

FileDisplay

  • Last Updated: May 5, 2026
  • 1 minute read
    • MarkLogic Server
    • Documentation

The FileDisplay widget displays a variety of file types in a tabbed container. The supported file types include:

  • CSV
  • DOC
  • DOCX
  • GIF
  • HTML
  • JPEG
  • JSON
  • PDF
  • PNG
  • RTF
  • SVG
  • TXT
  • XML

FileDisplay widget features

  • Secure rendering using XSS protection for HTML/JSON/TXT/XML content.

  • Handles unsupported file types gracefully.

  • Optionally displays a text excerpt along with the file in separate tabs.

The widget does not currently support Excel (XLS, XLSX) or PowerPoint (PPT, PPTX) file types.

FileDisplay example rendering

Example rendering of the FileDisplay widget.

FileDisplay example configuration

import { FileDisplay } from 'ml-fasttrack';
const obj = { first: "Mark", last: "Logic", type: "database" };
const jsonBlob = new Blob([JSON.stringify(obj)], { type: 'application/json' });
//...
<FileDisplay
  file={jsonBlob}
  extension="json"
  excerpt={"Mark"}
  style={{ height: 600 }}
  excerptLabel="Excerpt"
  documentLabel="Full Document"
  noPreviewMessage="No preview available."
/>

The file prop accepts the file to be rendered as a Blob (or File, which is based on Blob).

For more examples and information about the FileDisplay widget, see FastTrack Storybook.

TitleResults for “How to create a CRG?”Also Available inAlert