diff --git a/src/vpu-signature-pdf-upload.js b/src/vpu-signature-pdf-upload.js index ebb0fdf948c07258a2fb3d1d4faefcddbf30d0b0..8cf0d1ff418c2a9f5795d8280cc2cbe4906f9ed3 100644 --- a/src/vpu-signature-pdf-upload.js +++ b/src/vpu-signature-pdf-upload.js @@ -92,7 +92,7 @@ class SignaturePdfUpload extends VPUSignatureLitElement { // add all signed pdf files this.signedFiles.forEach((file) => { - let fileName = file.fileName; + let fileName = file.name; // if (fileNames.indexOf(fileName) !== -1) { @@ -119,11 +119,11 @@ class SignaturePdfUpload extends VPUSignatureLitElement { * @param file */ fileDownloadClickHandler(file) { - const arr = utils.convertDataURIToBinary(file.file); - const blob = new Blob([arr], { type: utils.getDataURIContentType(file.file) }); + const arr = utils.convertDataURIToBinary(file.contentUrl); + const blob = new Blob([arr], { type: utils.getDataURIContentType(file.contentUrl) }); // see: https://github.com/eligrey/FileSaver.js - saveAs(blob, file.fileName); + saveAs(blob, file.name); } /** @@ -182,7 +182,7 @@ class SignaturePdfUpload extends VPUSignatureLitElement { title="${i18n.t('pdf-upload.download-file-button-title')}" @click="${() => {this.fileDownloadClickHandler(file);}}"><vpu-icon name="download"></vpu-icon></button> <div class="info"> - <strong>${file.fileName}</strong> (${humanFileSize(file.contentSize)}) + <strong>${file.name}</strong> (${humanFileSize(file.contentSize)}) </div> </div> `);