Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: failed to open links to images generated by QR code tool when using Huawei OBS (#9034)

zhuhaoe1e2d0b3643b
diff --git a/api/extensions/storage/huawei_storage.py b/api/extensions/storage/huawei_storage.py
index 269a008fba3..b6ce10bd1f7 100644
--- a/api/extensions/storage/huawei_storage.py
+++ b/api/extensions/storage/huawei_storage.py
@@ -29,7 +29,8 @@ class HuaweiStorage(BaseStorage):
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()