From f6ab82faaf915839ce0dc5e7bd734b10962c8cd5 Mon Sep 17 00:00:00 2001 From: j433866 Date: Fri, 29 Mar 2019 13:42:07 +0000 Subject: [PATCH] Fix file preview not working --- src/web/InputWaiter.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/InputWaiter.mjs b/src/web/InputWaiter.mjs index d9668b66..d0cc34a3 100644 --- a/src/web/InputWaiter.mjs +++ b/src/web/InputWaiter.mjs @@ -700,9 +700,9 @@ class InputWaiter { displayFilePreview() { const inputNum = this.getActiveTab(), inputText = document.getElementById("input-text"), - fileSlice = this.fileBuffer.slice(0, 4096), + fileSlice = this.getInput(inputNum).slice(0, 4096), fileThumb = document.getElementById("input-file-thumbnail"), - arrBuffer = new Uint8Array(this.fileBuffer), + arrBuffer = new Uint8Array(this.getInput(inputNum)), type = isImage(arrBuffer); if (type && type !== "image/tiff" && this.app.options.imagePreview) { // Don't show TIFFs as not much supports them