content disposition
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { DownloadIcon, TextScanIcon, AnalyzeIcon, CloseIcon } from '../ui/icons';
|
||||
import { DownloadIcon, AnalyzeIcon, CloseIcon } from '../ui/icons';
|
||||
import DocumentSummarySection, {
|
||||
buildCorrespondentOptions,
|
||||
sortCorrespondents,
|
||||
@@ -249,9 +249,9 @@ const DocumentViewerPanel = ({
|
||||
{ocrError}
|
||||
</div>
|
||||
) : ocrUrl ? (
|
||||
<embed
|
||||
<iframe
|
||||
src={ocrUrl}
|
||||
type="text/plain"
|
||||
title={`OCR content for ${document.title || document.original_name || 'document'}`}
|
||||
className="document-viewer__object document-viewer__object--ocr"
|
||||
/>
|
||||
) : (
|
||||
@@ -293,7 +293,7 @@ export const createDocumentViewerHeaderActions = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
const { downloadHref, hasOcr, openOcr } = actionState;
|
||||
const { downloadHref } = actionState;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -309,19 +309,6 @@ export const createDocumentViewerHeaderActions = ({
|
||||
<DownloadIcon />
|
||||
</a>
|
||||
) : null}
|
||||
{hasOcr ? (
|
||||
<button
|
||||
type="button"
|
||||
className="icon-button"
|
||||
onClick={() => {
|
||||
openOcr().catch(() => {});
|
||||
}}
|
||||
aria-label="View OCR text"
|
||||
title="View OCR text"
|
||||
>
|
||||
<TextScanIcon />
|
||||
</button>
|
||||
) : null}
|
||||
<button
|
||||
type="button"
|
||||
className="icon-button"
|
||||
|
||||
Reference in New Issue
Block a user