Skip to content

fix(api): fall back to MIME icon when preview generation fails - #3037

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/fix-mimeIconFallback
Open

joshtrichards wants to merge 1 commit into
masterfrom
jtr/fix-mimeIconFallback

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Request MIME icon fallback for activity preview URLs. If a preview provider is available but cannot generate a thumbnail for a file, the preview endpoint can redirect to the file's MIME-type icon instead of returning a broken image.

Fixes #760

Looked into this when I noticed the default Resume.odt file doesn't include an embedded thumbnail so on a new install the icon ends up broken in the Activity stream (but not in Files itself; it already uses the fallback icon). (And, yeah, the Resume.odt skeleton file should get fixed too, but that doesn't change the need for this fix here). (P.S. I have no idea where the default skeleton files are maintained; they must be some part of the package build process -- if you know who to ping about about that matter let me know).

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Request MIME icon fallback for activity preview URLs. If a preview
provider is available but cannot generate a thumbnail for a file, the
preview endpoint can redirect to the file's MIME-type icon instead of
returning a broken image.

Fixes #760

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable35

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable34

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable33

@nickvergessen
nickvergessen removed their request for review October 20, 2026 17:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If preview generation fails for a file there is no fallback mimetype icon

1 participant