Browse Source

add:大模型,知识库管理,文件上传

zhongwei
luyie 3 months ago
parent
commit
a48498db9a
  1. 5
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/KnowledgeFileInfoController.java

5
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/KnowledgeFileInfoController.java

@ -15,6 +15,7 @@ import org.springblade.core.oss.model.BladeFile;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.resource.feign.IOssClient; import org.springblade.resource.feign.IOssClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -67,10 +68,10 @@ public class KnowledgeFileInfoController {
return R.status(knowledgeFileInfoService.removeByIds(Func.toLongList(",", ids))); return R.status(knowledgeFileInfoService.removeByIds(Func.toLongList(",", ids)));
} }
@PostMapping("/upload") @PostMapping(value = "/upload", produces = MediaType.APPLICATION_PROBLEM_JSON_VALUE, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@ApiOperation(value = "上传文件") @ApiOperation(value = "上传文件")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
public R<BladeFile> upload(@ApiParam(value = "上传文件", required = true) @RequestParam("file") MultipartFile file) { public R<BladeFile> upload(@ApiParam(value = "上传文件", required = true) @RequestPart("file") MultipartFile file) {
return ossClient.putFile(file); return ossClient.putFile(file);
} }
} }

Loading…
Cancel
Save