diff --git a/docs/en/plugin/dev/apis/common.md b/docs/en/plugin/dev/apis/common.md index 1dd9a100b..68eb2622a 100644 --- a/docs/en/plugin/dev/apis/common.md +++ b/docs/en/plugin/dev/apis/common.md @@ -297,4 +297,16 @@ async def delete_workspace_storage(self, key: str) -> None: # Usage example await self.plugin.delete_workspace_storage("key") -``` \ No newline at end of file +``` + +### Get Plugin File-typed Config Field Data + +```python +async def get_config_file(self, file_key: str) -> bytes: + """Get a config file value""" + +# Usage example +file_bytes = await self.plugin.get_config_file("key") +``` + +Use this in conjunction with configuration fields of type [`file` or `array[file`](/en/plugin/dev/basic-info.html#type-file). diff --git a/docs/zh/plugin/dev/apis/common.md b/docs/zh/plugin/dev/apis/common.md index 00e2773f6..f5b38ee23 100644 --- a/docs/zh/plugin/dev/apis/common.md +++ b/docs/zh/plugin/dev/apis/common.md @@ -297,4 +297,16 @@ async def delete_workspace_storage(self, key: str) -> None: # 调用示例 await self.plugin.delete_workspace_storage("key") -``` \ No newline at end of file +``` + +### 获取插件配置项文件数据 + +```python +async def get_config_file(self, file_key: str) -> bytes: + """Get a config file value""" + +# 调用示例 +file_bytes = await self.plugin.get_config_file("key") +``` + +请结合 [`file` 或 `array[file]` 类型配置项](/zh/plugin/dev/basic-info.html#type-file)使用。 \ No newline at end of file