gsxdsm
7137e36ccb
FN-7073: serve file previews inline
File viewer previews now request inline-safe responses while downloads remain attachments.
- Add an inline preview query option to file download URL helpers and preview consumers.
- Serve known media and PDF preview extensions with real MIME types, inline disposition, nosniff, and sandbox CSP headers.
- Keep explicit downloads and unknown file types on attachment/octet-stream behavior.
- Cover preview and download header behavior with dashboard route and component tests.
Files changed:
.changeset/fn-7073-file-viewer-inline-preview.md | 7 +
docs/dashboard-guide.md | 2 +-
packages/dashboard/app/api/legacy.ts | 9 +-
.../dashboard/app/components/DockFilesView.tsx | 2 +-
.../dashboard/app/components/FileBrowserModal.tsx | 2 +-
.../components/__tests__/DockFilesView.test.tsx | 14 +-
.../components/__tests__/FileBrowserModal.test.tsx | 12 +-
.../register-file-workspace-routes.test.ts | 141 +++++++++++++++++++++
.../src/routes/register-file-workspace-routes.ts | 111 +++++++++++-----
9 files changed, 260 insertions(+), 40 deletions(-)
Fusion-Task-Id: FN-7073
Fusion-Task-Lineage: 922b4aa4-ac6d-4a59-b94f-bab4eeb65530
2026-06-26 14:33:58 -07:00
..
2026-06-26 12:06:05 -07:00
2026-06-26 12:06:05 -07:00
2026-06-26 14:22:13 -07:00
2026-06-26 14:33:58 -07:00
2026-06-26 12:06:05 -07:00
2026-06-26 12:06:05 -07:00
2026-06-26 14:22:13 -07:00
2026-06-26 13:57:00 -07:00
2026-06-26 12:06:05 -07:00
2026-06-26 12:06:05 -07:00
2026-06-08 15:19:27 -07:00
2026-06-26 12:06:05 -07:00