This commit is contained in:
2025-11-20 02:36:32 +01:00
parent 78e6d3e431
commit a08e975da1
5 changed files with 6 additions and 21 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ interface DocumentViewerPanelProps extends DocumentSummarySectionProps {
contentType?: string | null;
filename?: string | null;
} | null;
ensureAssetUrl?: (docId: string | number, asset: AssetLike, options?: { start?: number; limit?: number }) => Promise<unknown>;
ensureAssetUrl?: (docId: string | number, asset: AssetLike, options?: { force?: boolean }) => Promise<unknown>;
getDocumentAsset?: (doc: DocumentLike | null, type: string) => AssetLike | null;
ensurePreviewData?: (docId: string | number, options?: { signal?: AbortSignal }) => Promise<DocumentLike | null>;
resolveApiPath?: (path: string) => string;
@@ -210,7 +210,7 @@ const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
let url = updateUrl();
if (!url && document.id && asset?.id && ensureAssetUrl) {
await ensureAssetUrl(document.id, asset, { start: 1, limit: 1 });
await ensureAssetUrl(document.id, asset, { force: true });
if (signal?.aborted) {
throw new DOMException('Aborted', 'AbortError');
}