diff --git a/adapter/utils/storage.py b/adapter/utils/storage.py index 1e3d0ea3..8534fd11 100644 --- a/adapter/utils/storage.py +++ b/adapter/utils/storage.py @@ -80,8 +80,23 @@ class RepoStorage(Storage): def storage(self): from bkstorages.backends.bkrepo import BKRepoStorage + class CustomBKRepoStorage(BKRepoStorage): + def save(self, name, content, max_length=None): + """ + 去除validate_file_name(name, allow_relative_path=True) 检查,保证content的可用性 + """ + if name is None: + name = content.name + + if not hasattr(content, "chunks"): + content = File(content, name) + + name = self.get_available_name(name, max_length=max_length) + name = self._save(name, content) + return name + if self._storage is None: - self._storage = BKRepoStorage() + self._storage = CustomBKRepoStorage() return self._storage def save(self, name, content, max_length=None): diff --git a/app.yml b/app.yml index 0cc07ea3..0ee73f8e 100644 --- a/app.yml +++ b/app.yml @@ -5,7 +5,7 @@ author: 蓝鲸智云 category: 办公应用 introduction: 流程服务是蓝鲸推出的轻量级ITSM,通过可自定义设计的流程模块,覆盖IT服务中的不同管理活动或应用场景。帮助企业用户规范内部管理流程,提升沟通及管理效率。 introduction_en: bk_itsm is a lightweight ITSM created by Blueking. It covers different application scenarios in IT services through customizable workflows and help enterprise users to implement standardize IT workflow, improve communication and management efficiency. -version: 2.6.11-alpha.1 +version: 2.6.11-alpha.2 language: python is_use_celery: True is_use_celery_with_gevent: False diff --git a/app_desc.yaml b/app_desc.yaml index 315fb90d..811a1aed 100644 --- a/app_desc.yaml +++ b/app_desc.yaml @@ -1,5 +1,5 @@ spec_version: 2 -app_version: "2.6.11-alpha.1" +app_version: "2.6.11-alpha.2" app: region: default bk_app_code: bk_itsm