Viewing files
Files attached to an item or a doc open inside termynl, in a viewer over the page. Everything else about files stays the same: they are stored and served exactly as before, and you can always download them.
- Where. In Details, click a file (or press Enter on it). In a doc, choose Open on a file card, click an uploaded image while reading (Open in its toolbar while editing), or choose Open in a video’s toolbar. Previous and next walk the list you opened from: all of the item’s files in their order, or the doc’s files, images and videos from top to bottom. The top bar shows where you are, for example “3 of 7”.
- What opens. PDFs up to 100 MB; Markdown (
.md,.markdown) and plain text and code (.txt,.log,.csv,.tsv,.json,.yaml,.toml,.ini,.xml,.js,.ts,.py,.go,.rs,.java,.c,.cpp,.cs,.rb,.php,.sh,.sql,.css,.diffand files with no extension) up to 1 MB; PNG, JPEG, GIF and WebP images, and SVG images up to 5 MB; MP4 and WebM video; WebM, Ogg and MP4 audio. - What stays download-only. HTML files (
.html,.htm,.xhtml,.mhtml) and.svgz, for your safety; Office files, archives and other types; WAV and MP3 audio; a file over its preview size; a password-protected PDF or one of more than 5,000 pages; an image of more than 100 million pixels; a text file that isn’t valid UTF-8. The viewer shows the file’s name and size, says why, and offers Download. - PDFs. Pages scroll in one column. The page strip (T) shows thumbnails and hides by default in a narrow window; the page field (G) takes a number. Zoom to Fit width, Fit page or 50–400 percent. Text can be selected and copied, and screen readers read it. A link to another page jumps there; a link to a website asks first and names the site. Forms aren’t filled in the viewer, and scripts inside a PDF never run. A large PDF loads completely before its first page shows, and a PDF of more than 5,000 pages downloads instead.
- Markdown reads the way a termynl doc reads. Raw HTML in the file shows as text. Images from the web are held back until you choose Load images from the web (a hidden image could otherwise tell whoever sent the file that you opened it, and when). Embeds and link previews show as plain links, and
[[links]]to docs are not followed, because an attached file is not a doc. A link in the file asks first and names the site it goes to. Source shows the raw text. - Text and code show line numbers and syntax highlighting (a very large file shows without colours), with Wrap and Copy all.
- Images sit on a checkered backdrop so transparency shows. Fit is the default; zoom in, choose Actual size, and drag or use Shift with the arrow keys to move around a zoomed image. An SVG shows as a picture only, so nothing inside it runs.
- Search (Ctrl+F or /, PDFs, Markdown and text) highlights every match and counts them; Enter and Shift+Enter step through them, and Match case narrows it. While the viewer is open, Ctrl+F searches the file, not the page.
- On a phone the viewer fills the screen. Pinch to zoom, double-tap to fit, swipe sideways on an image to move between files, and use the bottom bar for previous and next. The … menu has Download, Search, Fit and Go to page. The back gesture closes the viewer.
- A busy connected drive. If the workspace stores files in a connected drive (Google Drive, OneDrive, SharePoint, pCloud or Dropbox) and the drive is busy, the viewer says so, waits a few seconds and tries once more; then Try again and Download stay available.
- Privacy. The viewer opens only files you can already download, through the same short-lived link. PDFs, text, Markdown and SVG files are fetched with caching turned off and kept in the tab’s memory only while they are open. Images, video and audio use the same short-lived links as in a doc, so your browser may keep them in its cache after you close the viewer, as it does for images in a doc; on a shared computer, sign out and clear the browser’s data. The viewer loads nothing from other sites, except the images from the web in a Markdown file once you choose Load images from the web, and a link from a file opens only after you confirm it. The PDF reader, pdf.js (Apache License 2.0), is served by termynl itself, and its license and the licenses of its image decoders are at
/vendor/pdfjs/. Opening a file isn’t recorded in the audit log, the same as downloading it.
| Keys | Does |
|---|---|
| Enter | On a file, a file card or an image: open it in the viewer. |
| ← → | Previous or next file. |
| ↑ ↓, PgUp PgDn, Home End | In a PDF: previous or next page, first or last page. In other files they scroll. |
| Shift+← Shift+→ Shift+↑ Shift+↓ | Move around a zoomed image or a zoomed PDF page. |
| + - 0 | Zoom in, zoom out, back to Fit. |
| Ctrl+F or / | Search in the file (⌘F on a Mac). |
| G, T | In a PDF: go to a page, show or hide the page strip. |
| D | Download. |
| Esc | Close search, then the viewer. Focus goes back to the file, card or image you opened it from. |
| Tab | Move through the viewer’s buttons and the file; focus stays inside the viewer. |