Commit 1fb40c56 authored by alex yao's avatar alex yao

fix: File has been moved - cannot be read again

parent 9ed0c9c0
......@@ -213,7 +213,8 @@ public class AgentApplicationApiServiceImpl implements AgentApplicationApiServic
File tempFile = File.createTempFile(UUIDTool.getUUID(), "." + type);
file.transferTo(tempFile);
String uploadUrl = bosConfigService.upload(file.getInputStream(), type, file.getContentType());
tempFile.delete();
file.getInputStream().close();
String fileId = UUID.randomUUID().toString();
BizAgentApplicationApiFilesEntity bizAgentApplicationApiFilesEntity = new BizAgentApplicationApiFilesEntity();
bizAgentApplicationApiFilesEntity.setAgentId(agentId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment