Skip to content

Render report PDFs inline when S3 stored them as binary - #214

Merged
wasimxyz merged 2 commits into
stagingfrom
cursor/inline-pdf-report-embeds
Aug 31, 2026
Merged

Render report PDFs inline when S3 stored them as binary#214
wasimxyz merged 2 commits into
stagingfrom
cursor/inline-pdf-report-embeds

Conversation

@wasimxyz

Copy link
Copy Markdown
Member

Summary

  • Report embeds now request file downloads with disposition=inline, which overrides a stored binary/octet-stream type so the browser renders the PDF instead of downloading it.
  • Watcher and shared S3 uploads guess MIME types from a lowercased extension (Azure Cielo writes .PDF) and mark PDFs as inline on direct uploads.

Test plan

  • Open a qPCR run whose report is *_Report.PDF (e.g. Azure Cielo) and confirm the Report Data iframe shows the PDF instead of triggering a download.
  • Confirm "Open in new tab" on that report also displays the PDF.
  • Confirm the Files table download icon still saves the PDF.
  • Open a TapeStation or FPLC run with a PDF and confirm those report embeds still render.

Made with Cursor

Watcher uploads of uppercase .PDF files often land as binary/octet-stream, so the report iframe downloaded the file instead of showing it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
data-hub Ready Ready Preview Aug 31, 2026 8:29pm

Request Review

…ges.

The MIME-type fix needs a package bump before a production tag; watcher/AGENTS.md keeps later branches from shipping src/ changes at the old version.

Co-authored-by: Cursor <cursoragent@cursor.com>
@wasimxyz
wasimxyz merged commit 7e488b4 into staging Aug 31, 2026
6 checks passed
@wasimxyz
wasimxyz deleted the cursor/inline-pdf-report-embeds branch August 31, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant