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.

chore: use posixpath to wrapper filepath (#9976)

ice yaodd5ffaf05894
diff --git a/api/extensions/storage/aliyun_oss_storage.py b/api/extensions/storage/aliyun_oss_storage.py
index 67635b129e7..58c917dbd38 100644
--- a/api/extensions/storage/aliyun_oss_storage.py
+++ b/api/extensions/storage/aliyun_oss_storage.py
@@ -1,3 +1,4 @@
+import posixpath
from collections.abc import Generator
import oss2 as aliyun_s3
@@ -50,9 +51,4 @@ class AliyunOssStorage(BaseStorage):
self.client.delete_object(self.__wrapper_folder_filename(filename))
def __wrapper_folder_filename(self, filename) -> str:
- if self.folder:
- if self.folder.endswith("/"):
- filename = self.folder + filename
- else:
- filename = self.folder + "/" + filename
- return filename
+ return posixpath.join(self.folder, filename) if self.folder else filename