Skip to content

Commit

Permalink
fix: failed to open links to images generated by QR code tool when us…
Browse files Browse the repository at this point in the history
…ing Huawei OBS (langgenius#9034)
  • Loading branch information
hwzhuhao authored and JunXu01 committed Nov 9, 2024
1 parent 2fbe442 commit 518cdae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/extensions/storage/huawei_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def load_once(self, filename: str) -> bytes:
def load_stream(self, filename: str) -> Generator:
def generate(filename: str = filename) -> Generator:
response = self.client.getObject(bucketName=self.bucket_name, objectKey=filename)["body"].response
yield from response.read(4096)
while chunk := response.read(4096):
yield chunk

return generate()

Expand Down

0 comments on commit 518cdae

Please sign in to comment.