RED-7273: fixed viewer not opening docx files.
This commit is contained in:
parent
8f94cfb6b6
commit
83d294585e
@ -201,13 +201,14 @@ export class PdfViewer {
|
||||
|
||||
this.fileId = file.fileId;
|
||||
this.dossierId = file.dossierId;
|
||||
const filename = file?.filename.includes('.pdf') ? file?.filename : `${file?.filename}.pdf`;
|
||||
|
||||
this._logger.info('[PDF] Loading document...');
|
||||
|
||||
await this.runWithCleanup(async () => {
|
||||
const document = await this.documentViewer.getDocument()?.getPDFDoc();
|
||||
await document?.lock();
|
||||
this.#instance.UI.loadDocument(blob, { documentId: file.fileId, filename: file?.filename ?? 'document.pdf', onError });
|
||||
this.#instance.UI.loadDocument(blob, { documentId: file.fileId, filename: filename ?? 'document.pdf', onError });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user