mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-24 07:00:02 +08:00
feat: set local path of workerSrc to PdfLoader (#101)
This commit is contained in:
parent
d7c362f237
commit
16eade4c48
22
web/public/pdfjs-dist/pdf.worker.min.js
vendored
Normal file
22
web/public/pdfjs-dist/pdf.worker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -54,7 +54,11 @@ const DocumentPreviewer = ({ chunk, documentId, visible }: IProps) => {
|
||||
|
||||
return (
|
||||
<div className={styles.documentContainer}>
|
||||
<PdfLoader url={url} beforeLoad={<Skeleton active />}>
|
||||
<PdfLoader
|
||||
url={url}
|
||||
beforeLoad={<Skeleton active />}
|
||||
workerSrc="/pdfjs-dist/pdf.worker.min.js"
|
||||
>
|
||||
{(pdfDocument) => (
|
||||
<PdfHighlighter
|
||||
pdfDocument={pdfDocument}
|
||||
|
@ -43,7 +43,11 @@ const Preview = ({ selectedChunkId }: IProps) => {
|
||||
|
||||
return (
|
||||
<div className={styles.documentContainer}>
|
||||
<PdfLoader url={url} beforeLoad={<Skeleton active />}>
|
||||
<PdfLoader
|
||||
url={url}
|
||||
beforeLoad={<Skeleton active />}
|
||||
workerSrc="/pdfjs-dist/pdf.worker.min.js"
|
||||
>
|
||||
{(pdfDocument) => (
|
||||
<PdfHighlighter
|
||||
pdfDocument={pdfDocument}
|
||||
|
Loading…
x
Reference in New Issue
Block a user