| | |
| | | |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.Result; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.filecenter.model.FileInfo; |
| | | import com.kidgrow.filecenter.service.IFileService; |
| | | import org.springframework.http.MediaType; |
| | |
| | | public FileInfo thUpload(@RequestPart("file") MultipartFile file,@RequestParam String imgType) throws Exception { |
| | | return fileService.uploadForThumbnails(file,imgType); |
| | | } |
| | | /** |
| | | * base64上传图片 |
| | | */ |
| | | @PostMapping(value="baseUplaod",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | public FileInfo baseUplaod(@RequestParam("file") String file,@RequestParam("imgType") String imgType){ |
| | | return fileService.baseUplaod(file,imgType); |
| | | } |
| | | /** |
| | | * base64图片下载 |
| | | */ |
| | | @PostMapping(value="baseDownLoad") |
| | | public ResultBody baseDownLoad(@RequestBody Map<String,Object> map) throws Exception{ |
| | | return fileService.baseDownLoad(map); |
| | | } |
| | | |
| | | /** |
| | | * 文件删除 |