EOS Low-Code Platform 8 EOS Low-Code Platform 8
产品简介
安装部署
应用开发
专题场景实战案例
低代码(Low-Code)开发参考手册
高开开发参考手册
流程开发参考手册
AFCenter 使用指南
Governor 使用指南
FAQ
  • 开发eos数据实体支持文件保存
  • 开发步骤

# 开发EOS数据实体支持文件保存

EOS支持附件上传功能,新建EOS项目后,用户可以补充附件上传逻辑。

# 开发步骤

# 1. 引入IAttachmentService

@Autowired
private IAttachmentService attachmentService;

# 2. 调用uploadAttachments方法

attachmentService.uploadAttachments(appName, targetType, targetId, attachments);

参数说明

参数 类型 说明
appName String 应用名称
targetType String 目标类型
targetId String 目标ID
attachments List 输入流(MultipartFile类型的集合)

上传的附件信息,会保存在AFCENTER中的AFC_FILE_STORE表中,文件默认存在本地,但同时也支持上传阿里云等文件服务器,需要自行在application.properties文件中配置相关信息。

# 附件上传相关配置,不配置默认保存本地local
# mode: local,db,nexus,aliyun-oss
afc.attachments.persistence-mode=local
afc.attachments.local.dir=
afc.attachments.nexus.repository-url=
afc.attachments.nexus.username=
afc.attachments.nexus.password=
afc.attachments.aliyun-oss.endpoint=
afc.attachments.aliyun-oss.access-key-id=
afc.attachments.aliyun-oss.access-key-secret=
afc.attachments.aliyun-oss.bucket-name=
afc.attachments.libre-office.host=
#afc.attachments.libre-office.port=

← 开发EOS数据实体级联操作 EOS微服务应用会话数据以及前后端访问 →