We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3be166 commit b80e5bfCopy full SHA for b80e5bf
go_capture/views.py
@@ -17,12 +17,12 @@ def capture(request):
17
image = cv2.imdecode(image_data, cv2.IMREAD_COLOR)
18
board = perspective.get_grid(image)
19
black, white = find_stones.find_stones(board)
20
- file = io.StringIO()
21
- make_sgf(file, black, white)
22
- file.seek(0)
+ output_file = io.StringIO()
+ make_sgf(output_file, black, white)
+ output_file.seek(0)
23
filename = Path(image_file.name).stem
24
return FileResponse(
25
- file.read(),
+ output_file.read(),
26
status=201,
27
filename=f'${filename}.sgf',
28
as_attachment=True,
0 commit comments