From 7254fed8a1ca8106bc97ba5ab5a8d26e786475e1 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Sun, 26 Sep 2021 12:19:11 +0800 Subject: [PATCH] Finish changing storage file name --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 35f206f..5d465b2 100644 --- a/app.py +++ b/app.py @@ -386,7 +386,7 @@ def homeroom_confirm(): signature = request.form['signatureData'] signature = signature.removeprefix('data:image/png;base64,') signature = bytes(signature, 'utf-8') - rand = str(randint(100000000000000, 999999999999999)) + rand = str(date + '^' + homeroom[0] + '^' + homeroom[1] + '^' + 'hrCfrm') rand += ".png" with open(os.path.join('temp', rand), "wb") as fh: fh.write(base64.decodebytes(signature))