| | |
| | | import io.swagger.annotations.Api; |
| | | import org.apache.tomcat.util.http.fileupload.FileUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | |
| | | @PostMapping("/upload_chunk/") |
| | | public Result<Boolean> uploadFile(@RequestParam("file") MultipartFile file, |
| | | @RequestParam("uid") String uid, |
| | | @RequestParam("chunk") int chunk, |
| | | @RequestParam("filter_type") String filterType, |
| | | @RequestParam("fileName") String fileName, |
| | | @RequestParam(value = "chunks", required = false) String chunks) { |
| | | @RequestParam("uid") String uid, |
| | | @RequestParam("chunk") int chunk, |
| | | @RequestParam("filter_type") String filterType, |
| | | @RequestParam("fileName") String fileName, |
| | | @RequestParam(value = "chunks", required = false) String chunks) { |
| | | try { |
| | | String tempUploadDir = storageService.getConfig().getLocalPath() + File.separator + "TEMP_UPLOAD"; |
| | | File dir = new File(tempUploadDir); |