diff --git a/frontend/src/lib/components/common/fileDownload/S3TextPreview.svelte b/frontend/src/lib/components/common/fileDownload/S3TextPreview.svelte index 41226c6bb7..c606842f5a 100644 --- a/frontend/src/lib/components/common/fileDownload/S3TextPreview.svelte +++ b/frontend/src/lib/components/common/fileDownload/S3TextPreview.svelte @@ -62,6 +62,9 @@ } } + // The storage reports an empty file as a failed range read. + const EMPTY_FILE = /Range started at 0 and ended at 0/ + let preview = $derived(load(s3object.s3, s3object.storage, s3object.presigned)) @@ -71,7 +74,9 @@ {:then { res, readLimit }} {#if res.content_type === 'Unknown' || !res.content} -