()
| 41 | |
| 42 | @app.route("/save-as-base64/", methods=['POST']) |
| 43 | def base64_saver(): |
| 44 | filename = '{:10d}.png'.format(int(time())) # generate some filename |
| 45 | filepath = os.path.join(get_tmp_dir(), filename) |
| 46 | with open(filepath, "wb") as fh: |
| 47 | base64_data = request.json['image'].replace('data:image/png;base64,', '') |
| 48 | fh.write(base64.b64decode(base64_data)) |
| 49 | |
| 50 | return jsonify({}) |
| 51 | |
| 52 | |
| 53 | @app.route("/save-as-binary/", methods=['POST']) |
nothing calls this directly
no test coverage detected
searching dependent graphs…