Lauri Ojansivu
cd74045a9f
Attachment slideshow: Outlook .msg and OpenDocument are converted once, a piece at a time, into rows read a screen at a time.
...
An Outlook .msg (a Compound File of scattered sectors) and an
OpenDocument (a ZIP whose text is a compressed content.xml) cannot be
read a row at a time as they are: the slideshow read a .msg whole, up to
32 MB, and an OpenDocument as far as it was scrolled. Now the server
converts each the first time it is opened (server/lib/
attachmentPreviewStore.js):
- the original is read from its own storage in 64 KB byte ranges, never
whole; of a .msg only the sector tables are kept and the text streams
(models/lib/outlookMsgFormat.js openCompoundFile, outlookMsgRows),
attachment data is never read; of an OpenDocument only content.xml is
inflated and parsed as a stream (models/lib/zipDirectory.js and
odfBlocks.js, moved from the client so both share them);
- what is found is written as rows - one JSON object a line - with an
index of where each starts, to temporary names renamed when complete,
in attachment-previews/ under the files root; made again when the file
changes and removed with the attachment; two conversions at a time;
- one preview takes at most 512 MB of the server's disk, and a row
repeated more than 100,000 times is written that many times.
The parts are served at /cdn/storage/attachments/<id>/preview-meta,
-index and -rows, after every check the original has, with Range, as
application/octet-stream, nosniff and a sandboxing CSP. Two path
segments, as /thumbnail: Meteor-Files answers every longer path under
/cdn/storage itself. The slideshow reads them through
client/lib/attachmentRecords.js into IndexedView, whose scrollbar is
exactly the rows; only the visible rows are fetched and drawn, and no
viewer reads a file whole any more.
tests/attachmentPreviewStore.test.cjs reads a .msg with a 5 MB
attachment through ranges and finds it the same as the whole-file
reader without reading the attachment, a 60,000-line body and an
HTML-only body as rows, an OpenDocument's 6 MB picture never read, the
repeat and disk guards, made once and removed, and the route after
every check. attachment-rich-preview.e2e.js opens a 100,000-line .msg
in Chromium and finds only ranged preview parts fetched, the last line
at the end of the scrollbar, and the preview refused without signing in.
Thanks to xet7 !
2026-11-22 12:58:26 +02:00
..
2026-11-02 14:30:49 +02:00
2026-11-21 18:17:53 +02:00
2026-10-02 14:27:59 +03:00
2026-10-23 19:34:34 +03:00
2026-10-31 00:07:58 +02:00
2026-09-28 15:13:39 +03:00
2026-09-28 15:13:39 +03:00
2026-09-28 15:04:37 +03:00
2026-10-14 14:00:21 +03:00
2026-09-28 15:13:39 +03:00
2026-10-10 15:28:26 +03:00
2026-09-28 14:39:16 +03:00
2026-10-14 14:00:21 +03:00
2026-09-28 15:13:39 +03:00
2026-08-29 12:50:20 +03:00
2026-08-21 23:41:09 +03:00
2026-09-28 21:46:56 +03:00
2026-10-08 12:05:59 +03:00
2026-09-28 01:38:20 +03:00
2026-09-27 22:48:13 +03:00
2026-11-21 01:33:59 +02:00
2026-11-18 03:47:53 +02:00
2026-10-14 17:02:20 +03:00
2026-09-28 23:56:20 +03:00
2026-10-31 14:13:40 +02:00
2026-11-11 20:58:01 +02:00
2026-10-17 14:39:43 +03:00
2026-06-20 17:45:43 +03:00
2026-11-21 18:49:16 +02:00
2026-11-22 12:58:26 +02:00
2026-10-08 10:41:59 +03:00
2026-11-20 07:48:22 +02:00
2026-10-20 13:30:00 +03:00
2026-10-20 13:30:00 +03:00
2026-10-02 10:31:23 +03:00
2026-11-20 06:10:13 +02:00
2026-11-07 00:51:53 +02:00
2026-09-29 15:48:34 +03:00
2026-06-20 19:16:35 +03:00
2026-09-28 18:19:22 +03:00
2026-10-03 10:26:48 +03:00
2026-09-28 19:19:26 +03:00
2026-09-28 18:13:46 +03:00
2026-10-02 11:31:24 +03:00
2026-10-02 11:21:50 +03:00
2026-10-09 23:02:22 +03:00
2026-11-20 11:41:28 +02:00
2026-11-02 14:30:49 +02:00
2026-06-23 08:50:29 +03:00
2026-10-21 15:30:41 +03:00
2026-10-27 15:38:58 +02:00
2026-09-29 00:13:43 +03:00
2026-06-20 17:44:51 +03:00
2026-11-20 09:16:10 +02:00
2026-09-28 17:48:00 +03:00
2026-09-10 19:56:48 +03:00
2026-11-20 20:29:01 +02:00
2026-09-15 00:54:45 +03:00
2026-10-02 11:02:21 +03:00
2026-09-28 00:53:59 +03:00
2026-11-21 18:49:16 +02:00
2026-11-19 00:21:33 +02:00
2026-10-17 01:14:16 +03:00
2026-11-20 06:46:46 +02:00
2026-10-14 14:39:40 +03:00
2026-11-02 12:15:09 +02:00
2026-11-07 23:32:43 +02:00
2026-10-27 17:08:15 +02:00
2026-07-27 17:17:36 +03:00
2026-08-29 06:01:39 +03:00
2026-06-20 19:54:30 +03:00
2026-07-28 12:13:03 +03:00
2026-09-28 00:53:59 +03:00
2026-11-19 00:21:33 +02:00
2026-10-17 01:35:19 +03:00
2026-09-20 19:04:58 +03:00
2026-10-14 14:33:10 +03:00
2026-10-10 15:28:26 +03:00
2026-10-10 15:28:26 +03:00
2026-09-28 03:25:40 +03:00
2026-09-28 14:06:15 +03:00
2026-09-28 14:06:15 +03:00
2026-09-28 03:25:40 +03:00
2026-09-28 13:49:39 +03:00
Import and export mail, calendars, chats and notes: mbox/.eml, iCalendar, Google Takeout, Slack, Mattermost, Telegram, WhatsApp, Discord, Evernote.
2026-11-20 05:03:27 +02:00
2026-11-19 03:33:48 +02:00
2026-08-16 14:57:18 +03:00
2026-10-11 23:30:56 -04:00
2026-10-17 01:14:16 +03:00
2026-07-20 03:11:07 +03:00
2026-11-13 17:45:05 +02:00
2026-11-02 18:49:19 +02:00
2026-10-20 10:23:16 +03:00
2026-10-28 02:57:29 +02:00
2026-11-20 20:29:01 +02:00
2026-10-11 23:30:56 -04:00
2026-10-14 12:43:36 +03:00
2026-10-30 01:19:16 +02:00
2026-10-08 10:41:59 +03:00
2026-09-28 16:56:07 +03:00
2026-09-28 16:34:02 +03:00
2026-09-30 11:03:37 +03:00
2026-11-18 22:25:34 +02:00
2026-09-28 02:25:44 +03:00
2026-10-02 11:26:35 +03:00
2026-09-05 00:15:18 +03:00
2026-09-30 11:03:37 +03:00
2026-10-14 08:25:25 +03:00
2026-06-20 14:40:13 +03:00
2026-09-29 16:05:24 +03:00
2026-09-29 16:05:24 +03:00
2026-10-20 13:50:10 +03:00
2026-10-09 12:20:36 +03:00
2026-11-20 05:42:27 +02:00
2025-05-13 19:45:08 +01:00
2026-10-09 12:52:21 +03:00
2026-10-09 12:20:36 +03:00
2026-11-02 14:30:49 +02:00
2026-11-20 05:42:27 +02:00
2026-11-21 01:33:59 +02:00
2026-10-13 16:47:16 +03:00
2026-10-13 18:27:25 +03:00
2026-09-10 20:51:52 +03:00
2026-10-16 23:45:35 +03:00
2026-10-20 13:50:10 +03:00
2026-09-30 10:52:45 +03:00
2026-10-12 22:21:30 +03:00
2026-09-22 19:07:14 +03:00
2026-11-22 07:20:48 +02:00
2026-06-20 17:45:43 +03:00
2026-10-30 03:29:48 +02:00
2026-09-14 02:48:27 +03:00
2026-09-29 18:41:21 +03:00
2026-10-16 13:03:34 +03:00
2026-11-18 23:08:06 +02:00
2026-10-08 11:53:06 +03:00
2026-09-27 21:57:42 +03:00
2026-10-02 15:09:58 +03:00
2026-09-28 03:49:38 +03:00
2026-10-15 00:33:30 +03:00
2026-10-14 12:09:34 +03:00
2026-09-27 22:03:34 +03:00
2026-10-08 11:53:06 +03:00
2026-10-08 12:35:58 +03:00
2026-10-08 12:35:58 +03:00
2026-09-28 00:34:27 +03:00
2026-10-08 12:35:58 +03:00
2026-10-08 12:35:58 +03:00
2026-10-08 11:53:06 +03:00
2026-09-27 23:53:07 +03:00
2026-09-27 23:53:07 +03:00
2026-10-14 22:56:34 +03:00
2026-07-19 12:45:03 +03:00
2026-10-02 10:31:23 +03:00
2026-08-04 12:09:37 +03:00
2026-09-10 16:21:52 +03:00
2026-11-02 14:30:49 +02:00
2026-08-04 12:09:37 +03:00
2026-11-20 05:42:27 +02:00
2026-10-13 18:27:25 +03:00
2026-09-28 13:36:02 +03:00
2026-11-21 01:33:59 +02:00
2026-10-22 04:12:13 +03:00
2026-11-21 01:33:59 +02:00
2026-10-27 16:28:12 +02:00
2026-11-20 11:41:28 +02:00
2026-10-22 15:16:50 +03:00
2026-09-28 13:36:02 +03:00
2026-10-11 17:41:28 +03:00
2026-10-11 22:46:45 +03:00
2026-11-16 16:46:06 +02:00
2026-10-25 03:18:15 +03:00
2026-11-20 05:42:27 +02:00
2026-09-10 20:27:34 +03:00
2026-10-08 11:48:01 +03:00
2026-10-27 10:05:01 +02:00
2026-10-08 11:18:14 +03:00
2026-07-26 03:18:31 +03:00
2026-09-28 13:11:17 +03:00
2026-10-14 08:20:30 +03:00
2026-09-23 20:31:35 +03:00
2026-10-31 14:54:22 +02:00
2026-11-20 05:42:27 +02:00
2026-11-20 11:21:50 +02:00
2026-10-07 23:46:07 +03:00
2026-11-19 00:21:33 +02:00
2026-11-19 00:21:33 +02:00
2026-09-06 10:30:27 +03:00
2026-06-20 19:16:35 +03:00
2026-11-21 23:44:34 +02:00
2026-07-23 15:03:42 +03:00
2026-09-06 02:28:46 +03:00
2026-10-11 17:41:28 +03:00
2026-06-23 16:50:24 +03:00
2026-11-19 00:21:33 +02:00
2026-06-23 08:50:29 +03:00
2026-08-25 19:29:41 +03:00
2026-11-18 19:31:45 +03:00
2026-10-14 11:03:53 +03:00
2026-09-28 21:07:14 +03:00
2026-09-28 20:29:08 +03:00
2026-10-02 11:21:50 +03:00
2026-09-28 21:07:14 +03:00
2026-09-28 20:35:33 +03:00
2026-10-08 11:51:44 +03:00
2026-09-28 20:05:27 +03:00
2026-09-28 21:02:59 +03:00
2026-11-18 23:08:06 +02:00
2026-09-28 19:28:24 +03:00
2026-10-03 14:26:15 +03:00
2026-09-29 14:34:18 +03:00
2026-11-21 23:44:34 +02:00
2026-09-28 02:30:48 +03:00
2026-11-11 00:07:26 +02:00
2026-10-03 09:49:31 +03:00
2026-10-03 00:38:38 +03:00
2026-10-03 01:47:19 +03:00
2026-10-14 21:45:54 +03:00
2026-09-28 23:43:32 +03:00
2026-10-03 01:47:19 +03:00
2026-10-08 12:06:49 +03:00
2026-09-28 23:43:32 +03:00
2026-10-08 12:06:49 +03:00
2026-09-28 23:43:32 +03:00
2026-10-14 22:39:36 +03:00
2026-09-28 17:13:49 +03:00
2026-10-14 21:45:54 +03:00
2026-09-27 22:55:36 +03:00
2026-10-08 12:36:57 +03:00
2026-10-02 21:02:28 +03:00
2026-10-03 01:47:19 +03:00
2026-10-02 20:53:38 +03:00
2026-10-03 01:47:19 +03:00
2026-10-03 01:47:19 +03:00
2026-10-03 01:47:19 +03:00
2026-10-08 11:51:44 +03:00
2026-10-03 01:47:19 +03:00
2026-10-10 11:44:19 +03:00
2026-10-22 04:56:40 +03:00
2026-10-18 14:28:19 +03:00
2026-08-11 15:50:31 +03:00
2026-10-13 21:08:09 +03:00
2026-10-31 14:54:22 +02:00
2026-09-28 13:49:39 +03:00
2026-09-28 13:49:39 +03:00
2026-11-19 00:21:33 +02:00
2026-07-19 14:00:25 +03:00
2026-10-14 08:20:30 +03:00
2026-10-14 22:39:36 +03:00
2026-11-20 06:14:07 +02:00
2026-11-20 11:41:28 +02:00
2026-09-14 12:09:35 +03:00
2026-09-14 12:09:35 +03:00
2026-10-10 15:25:16 +03:00
2026-10-25 07:23:31 +02:00
2026-09-30 02:00:42 +03:00
2026-10-03 00:08:13 +03:00
2026-09-28 04:08:03 +03:00
2026-09-28 14:15:55 +03:00
2026-09-28 04:08:03 +03:00
2026-09-28 04:20:50 +03:00
2026-10-02 18:19:02 +03:00
2026-09-30 11:50:04 +03:00
2026-10-08 12:35:58 +03:00
2026-09-28 04:37:02 +03:00
2026-09-28 04:33:45 +03:00
2026-09-27 22:03:34 +03:00
2026-10-03 00:08:13 +03:00
2026-10-14 17:48:45 +03:00
2026-09-30 11:39:05 +03:00
2026-10-02 18:19:02 +03:00
2026-09-30 11:29:44 +03:00
2026-10-08 12:35:58 +03:00
2026-09-28 01:59:40 +03:00
2026-09-28 04:17:46 +03:00
2026-09-30 11:39:05 +03:00
2026-10-02 18:27:47 +03:00
2026-10-03 00:08:13 +03:00
2026-09-28 16:21:11 +03:00
2026-09-28 16:12:55 +03:00
2026-09-28 16:15:36 +03:00
2026-10-03 09:44:45 +03:00
2026-10-03 09:44:45 +03:00
2026-09-30 11:52:30 +03:00
2026-10-08 11:31:12 +03:00
2026-10-03 00:22:57 +03:00
2026-10-03 00:22:57 +03:00
2026-10-14 22:08:34 +03:00
2026-10-02 16:58:24 +03:00
2026-09-28 15:46:13 +03:00
2026-09-28 20:23:01 +03:00
2026-09-30 01:46:04 +03:00
2026-09-30 11:42:51 +03:00
2026-09-30 01:46:04 +03:00
2026-09-30 01:46:04 +03:00
2026-09-30 10:23:15 +03:00
2026-09-30 10:23:15 +03:00
2026-09-28 15:32:58 +03:00
2026-10-03 00:22:57 +03:00
2026-10-03 09:44:45 +03:00
2026-10-10 11:44:19 +03:00
2026-10-03 09:44:45 +03:00
2026-09-30 11:42:51 +03:00
2026-09-30 11:42:51 +03:00
2026-10-03 09:44:45 +03:00
2026-09-28 00:28:58 +03:00
2026-09-28 00:34:27 +03:00
2026-09-28 04:08:03 +03:00
2026-10-03 00:08:13 +03:00
2026-09-28 05:36:48 +03:00
2026-09-28 13:11:17 +03:00
2026-09-30 11:39:05 +03:00
2026-09-30 11:39:05 +03:00
2026-10-12 11:14:34 +03:00
2026-10-27 17:08:15 +02:00
2026-09-28 19:19:26 +03:00
2026-11-20 11:21:50 +02:00
2026-11-02 14:30:49 +02:00
2026-08-16 14:57:18 +03:00
2026-11-11 00:06:31 +02:00
2026-09-28 00:53:59 +03:00
2026-10-10 15:28:26 +03:00
2026-11-02 14:30:49 +02:00
2026-10-27 14:52:06 +02:00
2026-07-06 11:50:28 +03:00
2026-11-20 05:42:27 +02:00
2026-10-02 10:29:07 +03:00
2026-10-14 16:46:59 +03:00
2026-10-18 14:28:19 +03:00
2026-10-10 15:28:26 +03:00
2026-11-21 23:44:34 +02:00
2026-11-20 11:41:28 +02:00
2026-11-20 05:42:27 +02:00