feat(views): add document-centric view at /files/{id}

- Revert search.html and files.html links back to /files/{id}
- Add GET /files/{file_id} route (file_view_page) with workdir path-
  containment guards (os.path.commonpath) to prevent traversal
- Create file_view.html: document-centric page showing AI metadata,
  inline PDF preview, extracted OCR text, download actions, file info,
  status pill, and link to /files/{id}/detail for process pipeline view
- Existing /files/{id}/detail route is unchanged

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-26 23:02:25 +00:00
parent da865b5f7a
commit c540dd4f52
4 changed files with 499 additions and 2 deletions
+1 -1
View File
@@ -196,7 +196,7 @@
var tags = Array.isArray(hit.tags) ? hit.tags : (hit.tags ? [hit.tags] : []);
var docType = hit.document_type || '';
var sender = hit.sender || hit.absender || '';
var fileUrl = '/files/' + hit.file_id + '/detail';
var fileUrl = '/files/' + hit.file_id;
// Build badges
var badges = '';