|
@@ -236,6 +236,9 @@ public class TencentWeComController {
|
|
|
@PostMapping("/send/post/file")
|
|
|
public String sendPostFile(@RequestParam String url, @RequestParam("media") MultipartFile multipartFile) throws IOException {
|
|
|
String filePath = UUID.randomUUID() + ".jpg";
|
|
|
+ if (multipartFile.isEmpty()) {
|
|
|
+ log.error("multipartFile is empty");
|
|
|
+ }
|
|
|
File file = new File(filePath);
|
|
|
// 将MultipartFile的内容传输到File中
|
|
|
multipartFile.transferTo(file);
|