diff --git a/docker/nginx.conf b/docker/nginx.conf index f86d149..bee09c1 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -1,3 +1,9 @@ +# This file is included at http level, so this adds to nginx's MIME table. +# Browsers refuse to run module scripts (the pdf.js worker) served as octet-stream. +types { + text/javascript mjs; +} + server { listen 80; server_name _; diff --git a/src/lib/components/PdfBackground.svelte b/src/lib/components/PdfBackground.svelte index 4c070ba..3d3494e 100644 --- a/src/lib/components/PdfBackground.svelte +++ b/src/lib/components/PdfBackground.svelte @@ -1,5 +1,5 @@ - -{#if failed} -
Source PDF “{origin.name}” is not available
+ +{#if failure === 'missing'} +
Source PDF “{origin.name}” is not stored on this device
+{:else if failure === 'error'} +
Could not display “{origin.name}” (see the browser console)
{/if}