fiuai-s3 0.3.8__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fiuai-s3 might be problematic. Click here for more details.
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/PKG-INFO +1 -1
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/pyproject.toml +1 -1
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/__init__.py +1 -1
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/minio/minio_storage.py +5 -4
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/object_storage.py +1 -1
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/.gitignore +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/LICENSE +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/README.md +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/alicloud/__init__.py +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/alicloud/alicloud_storage.py +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/minio/__init__.py +0 -0
- {fiuai_s3-0.3.8 → fiuai_s3-0.4.0}/src/fiuai_s3/type.py +0 -0
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
from .object_storage import ObjectStorage, ObjectStorageFactory, StorageConfig
|
|
9
9
|
from .type import DocFileObject, DocSourceFrom, DocFileType
|
|
10
10
|
|
|
11
|
-
__version__ = "0.3.
|
|
11
|
+
__version__ = "0.3.9"
|
|
12
12
|
__all__ = ["ObjectStorage", "ObjectStorageFactory", "StorageConfig", "DocFileObject", "DocSourceFrom", "DocFileType"]
|
|
@@ -78,7 +78,7 @@ class MinioStorage(ObjectStorage):
|
|
|
78
78
|
object_key: 对象存储中的key
|
|
79
79
|
tmppath: 临时文件路径, 如果为空,则使用默认临时目录
|
|
80
80
|
"""
|
|
81
|
-
_path = f"{self.config.temp_dir}/{object_key}" if not tmppath else f"{tmppath}/{object_key}"
|
|
81
|
+
_path = f"{self.config.temp_dir}/{object_key}" if not tmppath else f"{tmppath.rstrip('/')}/{object_key}"
|
|
82
82
|
return self.upload_file(_path, data)
|
|
83
83
|
|
|
84
84
|
def download_temp_file(self, object_key: str, tmppath: str = None) -> bool:
|
|
@@ -88,7 +88,7 @@ class MinioStorage(ObjectStorage):
|
|
|
88
88
|
object_key: 对象存储中的key
|
|
89
89
|
tmppath: 临时文件路径, 如果为空,则使用默认临时目录
|
|
90
90
|
"""
|
|
91
|
-
_path = f"{self.config.temp_dir}/{object_key}" if not tmppath else f"{tmppath}/{object_key}"
|
|
91
|
+
_path = f"{self.config.temp_dir}/{object_key}" if not tmppath else f"{tmppath.rstrip('/')}/{object_key}"
|
|
92
92
|
return self.download_file(_path)
|
|
93
93
|
|
|
94
94
|
def upload_file(self, object_key: str, data: bytes) -> bool:
|
|
@@ -199,8 +199,9 @@ class MinioStorage(ObjectStorage):
|
|
|
199
199
|
object_key = self._build_doc_path(filename, auth_tenant_id, auth_company_id, doc_id)
|
|
200
200
|
# 将tags转换为Tags对象
|
|
201
201
|
tags_obj = Tags()
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
if tags:
|
|
203
|
+
for k, v in tags.items():
|
|
204
|
+
tags_obj[k] = v
|
|
204
205
|
|
|
205
206
|
doc_source_from = doc_source_from if doc_source_from else DocSourceFrom.OTHER
|
|
206
207
|
doc_file_type = doc_file_type if doc_file_type else DocFileType.OTHER
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|