From e8ff2e20fd820b6dc0137ba9480041c8f64eb6a7 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 7 Oct 2021 09:15:01 +0200 Subject: [PATCH] =?UTF-8?q?Signature=20pad=20en=20png=20pour=20eviter=20le?= =?UTF-8?q?s=20probl=C3=A8me=20de=20ration=20de=20pixel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 905e282..25fc902 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -244,9 +244,8 @@ loadingTask.promise.then(function(pdf) { throttle: 0, onEnd: function() { document.getElementById('btn_modal_ajouter').setAttribute('disabled', 'disabled'); - - const file = new File([dataURLtoBlob(signaturePad.toDataURL("image/svg+xml"))], "draw.svg", { - type: 'image/svg+xml' + const file = new File([dataURLtoBlob(signaturePad.toDataURL())], "draw.png", { + type: 'image/png' }); var data = new FormData(); data.append('file', file);