Document viewer
What it is
Section titled “What it is”The document viewer is the screen that opens when you tap a document. It renders the file inline (PDFs through a PDF viewer, photos and scans through an image viewer) and offers the small toolbar of actions that apply to the document: Share, Replace, Edit, Delete.
The same viewer handles every kind of document: asset, syndicate, and pilot. The actions on offer depend on your role and on which kind of document is open.
Who can use it
Section titled “Who can use it”- Every member of the syndicate can open any document in their syndicate’s library and use the Share action.
- Admins additionally see Replace, Edit, and Delete on syndicate-scoped documents.
- Pilots see Replace, Edit, and Delete only on their own pilot documents. See Roles and permissions.
Where to find it
Section titled “Where to find it”You don’t navigate to the viewer directly; you reach it by tapping a document row. Routes:
| Document kind | Route |
|---|---|
| Syndicate / asset document | /syndicates/:syndicateId/documents/:documentId |
| Pilot document | /settings/documents/mine/:documentId |
The viewer can also be opened from the bell notification for an expiring document. Asset and syndicate document notifications deep-link to the individual document. Pilot document reminders (medical expiry) open the My documents area rather than a single-document deep link.
What it renders
Section titled “What it renders”| File format | Viewer |
|---|---|
| Inline PDF renderer. The same engine on iOS, Android, and the web; there is no platform branching for PDFs. | |
| JPEG / PNG / WebP | Inline image viewer with cached download. Pinch to zoom on mobile; scroll to zoom on the web. |
If the file is in the offline document cache on this device, the viewer renders from disk with no network round-trip. Otherwise it fetches a fresh short-lived signed URL and renders from there. There is no visible difference between the two paths.
A date-only pilot medical has no file at all. The viewer shows the expiry date and a line explaining that the certificate has not been uploaded; there is nothing to render, share, or cache.
Toolbar actions
Section titled “Toolbar actions”The actions in the viewer’s toolbar depend on your role and the kind of document.
| Action | When it’s shown |
|---|---|
| Share | Whenever the document has a file. Opens the file in the system browser / viewer, where you can save, print, email, or AirDrop it as usual. The browser is handed a fresh short-lived signed URL; the link will stop working after 15 minutes. A date-only medical has no file, so no Share action. |
| Replace | When you are an admin viewing a syndicate-scoped document, or the pilot viewing your own pilot document. Replacement is atomic; see Replace a document. On a date-only medical the same slot reads Upload certificate and attaches a file to the existing record. |
| Edit | Same conditions as Replace. Lets you change the title, the type, and the expiry without changing the file. |
| Delete | Same conditions as Replace. A confirmation dialog precedes removal; deleting your own medical opens a dedicated two-outcome screen instead (see Pilot documents). |
The viewer is always read-only for anyone outside the conditions above. Members open documents from the syndicate library to read them; that’s the design.
Behaviour rules
Section titled “Behaviour rules”- The viewer always shows the latest file. A document replaced by an admin while you have the viewer open will refresh to the new file on the next focus.
- Signed URLs are short-lived. If you share a link via the system browser and pass it to someone who is not a member of the syndicate, the link will stop working within 15 minutes. There is no way to mint a long-lived public link.
- Deletion confirms. Tapping Delete opens a confirmation dialog (or, for your own medical, the two-outcome delete screen). Deletion removes the file from storage, the document’s record, and the cached copy on every device’s offline cache at the next sync. There is no recovery.
- Replace pops the viewer. When a replacement succeeds, the viewer returns you to the library and the row now points at the new file. Re-tap the row to open the new file.
- PDF / image / unknown. Files outside the accepted format list cannot be uploaded in the first place, so the viewer’s two render paths cover every case it will ever see.