From 4ab74d6a630b3a8b74bd1f96f00309d157844c43 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Sat, 27 Aug 2022 05:49:42 -0400 Subject: cache sample --- app.py | 5 +++-- static/sample-polyglot.enc | Bin 0 -> 135808 bytes 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 static/sample-polyglot.enc diff --git a/app.py b/app.py index f6d11ae..06c5f36 100644 --- a/app.py +++ b/app.py @@ -161,8 +161,9 @@ def key_commitment(): if form.is_submitted(): if form.validate(): if form.mode.data == 'sample': - jpeg_bytes = open('static/axolotl.jpg', 'rb').read() - bmp_bytes = open('static/kitten.bmp', 'rb').read() + # jpeg_bytes = open('static/axolotl.jpg', 'rb').read() + # bmp_bytes = open('static/kitten.bmp', 'rb').read() + return send_file('static/sample-polyglot.enc', mimetype='application/octet-stream', as_attachment=True, download_name="polyglot.enc") else: jpeg_bytes = form.jpeg.data.read() bmp_bytes = form.bmp.data.read() diff --git a/static/sample-polyglot.enc b/static/sample-polyglot.enc new file mode 100644 index 0000000..58730dd Binary files /dev/null and b/static/sample-polyglot.enc differ -- cgit v1.2.3