commit
44e85a1d38
1 changed files with 5 additions and 1 deletions
|
@ -56,6 +56,10 @@
|
||||||
|
|
||||||
document.querySelector("#editSection").style.display = "";
|
document.querySelector("#editSection").style.display = "";
|
||||||
|
|
||||||
|
const existingPreview = document.getElementById("pdf-preview");
|
||||||
|
if (existingPreview) {
|
||||||
|
existingPreview.remove();
|
||||||
|
}
|
||||||
var url = URL.createObjectURL(fileInput.files[0])
|
var url = URL.createObjectURL(fileInput.files[0])
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js'
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js'
|
||||||
const pdf = await pdfjsLib.getDocument(url).promise;
|
const pdf = await pdfjsLib.getDocument(url).promise;
|
||||||
|
|
Loading…
Reference in a new issue