Skip to content

Commit

Permalink
fix: fix image_response function
Browse files Browse the repository at this point in the history
after upgrade to Falcon 3.1
  • Loading branch information
raphael0202 committed Dec 18, 2023
1 parent 9c6a4ee commit 82a826d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions robotoff/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ def image_response(image: Image.Image, resp: falcon.Response) -> None:
resp.content_type = "image/jpeg"
fp = io.BytesIO()
image.save(fp, "JPEG")
resp.stream_len = fp.tell()
stream_len = fp.tell()
fp.seek(0)
resp.stream = fp
resp.set_stream(fp, stream_len)


class ImageLogoResource:
Expand Down

0 comments on commit 82a826d

Please sign in to comment.