Fedgo29 commited on
Commit ·
03e4b3d
1
Parent(s): f982bb6
Adding changes by FedgoX
Browse filesFiles changed (2)
96 unmodified lines97989910010110210396 unmodified linesqrs_dir = os.path.join(current_app.static_folder, "qrs")os.makedirs(qrs_dir, exist_ok=True)qr_path = os.path.join(qrs_dir, f"{diploma.hash_code}.png")qr.save(qr_path)# save uploaded pdf if presentif not request.is_json and "pdf" in request.files:96 unmodified lines97989910010110210310410510696 unmodified linesqrs_dir = os.path.join(current_app.static_folder, "qrs")os.makedirs(qrs_dir, exist_ok=True)qr_path = os.path.join(qrs_dir, f"{diploma.hash_code}.png")# write QR image to file in binary mode; some image backends require a file-like# object rather than a filename string (png writer calls write() on the stream).with open(qr_path, "wb") as qr_file:qr.save(qr_file)# save uploaded pdf if presentif not request.is_json and "pdf" in request.files:
96 unmodified lines97989910010110210396 unmodified linesqrs_dir = os.path.join(current_app.static_folder, "qrs")os.makedirs(qrs_dir, exist_ok=True)qr_path = os.path.join(qrs_dir, f"{diploma.hash_code}.png")qr.save(qr_path)# save uploaded pdf if presentif not request.is_json and "pdf" in request.files:96 unmodified lines97989910010110210310410510696 unmodified linesqrs_dir = os.path.join(current_app.static_folder, "qrs")os.makedirs(qrs_dir, exist_ok=True)qr_path = os.path.join(qrs_dir, f"{diploma.hash_code}.png")# write QR image to file in binary mode; some image backends require a file-like# object rather than a filename string (png writer calls write() on the stream).with open(qr_path, "wb") as qr_file:qr.save(qr_file)# save uploaded pdf if presentif not request.is_json and "pdf" in request.files:
app/routes/diploma.py+4-1
app_pkg/routes/diploma.py+4-1