mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 16:35:06 +08:00
文件上传
This commit is contained in:
@ -55,7 +55,7 @@ public class FileController {
|
||||
@ApiImplicitParam(name = "file", value = "文件附件", required = true, dataTypeClass = MultipartFile.class),
|
||||
})
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
String path = DateUtil.format(new Date(), "yyyy/MM/dd/") + file.getName();
|
||||
String path = DateUtil.format(new Date(), "yyyy/MM/dd/") + file.getOriginalFilename();
|
||||
return success(fileService.createFile(path, IoUtil.readBytes(file.getInputStream())));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user