Feature: attachment preview - reliable MIME + inline PDF on desktop and mobile
- MIME: Stalwart's download endpoint often returns application/octet-stream, so blob: previews silently downloaded (UUID filename) instead of rendering. Resolve the most specific MIME (attachment type -> filename ext -> blob type) and re-wrap the blob; also fixes inline preview for images and video. - Desktop PDF: render via <iframe> (reliable for blob: PDFs) instead of <object>. - Mobile PDF: no usable inline viewer (Android shows a blank frame / silent download; iOS Safari renders only the first page of a PDF in an <iframe>), so render with pdf.js (canvas, dynamic-imported so it stays off the desktop bundle; iOS-safe canvas cap). Double-tap zoom (fit -> 2x -> 3x -> fit) and 2-finger pinch zoom (to 4x), both centred on the gesture and pannable via native scrolling. - Route to pdf.js when navigator.pdfViewerEnabled is false (Android) and on iOS (incl. iPadOS, which reports true yet shows only the first page in a frame). - Modal header gains an open-in-new-tab icon (next to download/close); the Android/browser Back button closes the preview instead of navigating the page. - On a pdf.js render failure, offer an open-in-new-tab action as fallback.
This commit is contained in:
@@ -2814,6 +2814,7 @@
|
||||
"hint": "Haz clic en un correo a la izquierda para empezar, o inicia el tour."
|
||||
},
|
||||
"files": {
|
||||
"open_in_new_tab": "Abrir en una pestaña nueva",
|
||||
"title": "Archivos",
|
||||
"search_placeholder": "Buscar archivos...",
|
||||
"empty_state_title": "Aún no hay archivos",
|
||||
|
||||
Reference in New Issue
Block a user