mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
feat(documents): open a PDF or image original in a new browser tab
The document sheet gains an Open in new tab action for the types the browser renders itself (PDF, JPEG, PNG, WebP, GIF), so a long report gets the browser's own zoom and search instead of the small preview. It opens the object URL the sheet already fetched through the app transport: a plain navigation to the serve route carries no record-session assertion and would be refused inside a shared record. Every other type keeps the download only, and the serve route's matrix now pins SVG and HTML to attachment as well.
This commit is contained in:
1 parent
fca1260b20
commit
12a8ab7c63
10 files changed
+95
-2
No files matched your search
@@ -240,6 +240,10 @@ describe("serving-posture header matrix (Class A inline vs Class B attachment)",
|
||||
["image/heic", "photo.heic"],
|
||||
["application/xml", "export.xml"],
|
||||
["application/json", "export.json"],
|
||||
// Upload refuses markup outright; a row that somehow carries one must
|
||||
// still never render in-origin, where its script would run.
|
||||
["image/svg+xml", "drawing.svg"],
|
||||
["text/html", "page.html"],
|
||||
])(
|
||||
"Class B %s → attachment + octet-stream, never inline",
|
||||
async (mime, name) => {
|
||||
|
||||
Reference in new issue
Block a user