|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|