Skip to content

file-preview pdf file getting downloaded instead of preview #104

Description

@xmlking

I am exploring FilePreview component, with sample Code
I expected when I click the PDF file in the FileBrowser, it will preview PDF content, but it keep downloading .pdf file

if this a mime type issue?

Image

Enhancement Proposal:

would be nice to have custom preview support with my own viewer components : e.g., Extend UI
would be nice if developer can pass their own viewer component as prop to FileBrowser so FileBrowser can generate direct URL and pass it to viewer component for rendering.

#  Extend UI components for document viewers for PDF, DOCX, XLSX, and CSV (optional)
bunx --bun shadcn@latest add -p src/components/extend @extend/pdf-viewer
bunx --bun shadcn@latest add -p src/components/extend @extend/docx-viewer
bunx --bun shadcn@latest add -p src/components/extend @extend/schema-builder

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions