This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, render_template, make_response | |
from flask_bootstrap import Bootstrap | |
import os | |
import uuid | |
import base64 | |
from PIL import Image | |
import warnings | |
warnings.simplefilter('error', Image.DecompressionBombWarning) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://d.line-scdn.net/liff/1.0/sdk.js" /></script> | |
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script> | |
<script> | |
const canvas = document.querySelector('#canvas'); | |
const signaturePad = new SignaturePad(canvas, { | |
backgroundColor: 'rgb(238,238,238)', | |
}); | |
$(window).on('load', function(){ | |
canvas.setAttribute('width', $('.container').width()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liff.getProfile().then(function (profile) { | |
liff.sendMessages([ | |
{ | |
type: 'image', | |
originalContentUrl: 'https://' + document.domain + '/imgs/' + res + '.jpg', | |
previewImageUrl: 'https://' + document.domain + '/imgs/' + res + '_240.jpg' | |
}, | |
{ | |
type: 'text', | |
text: 'From:' + profile.displayName |
NewerOlder