|
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.*;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Paths;
|
|
|
+import java.util.Base64;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
|
|
@@ -239,7 +240,9 @@ public class TencentWeComController {
|
|
|
File file = new File(filePath);
|
|
|
// 将MultipartFile的内容传输到File中
|
|
|
multipartFile.transferTo(file);
|
|
|
- log.info("sendPostFile url={}", url);
|
|
|
+ byte[] decodedBytes = Base64.getDecoder().decode(url);
|
|
|
+ String originalString = new String(decodedBytes);
|
|
|
+ log.info("sendPostFile url={}", originalString);
|
|
|
String post = httpPoolClient.post(url, file);
|
|
|
Files.delete(Paths.get(filePath));
|
|
|
return post;
|
|
@@ -247,7 +250,9 @@ public class TencentWeComController {
|
|
|
|
|
|
@GetMapping("/send/get")
|
|
|
public String sendGet(@RequestParam String url) throws IOException {
|
|
|
- log.info("sendGet url={}", url);
|
|
|
- return httpPoolClient.get(url);
|
|
|
+ byte[] decodedBytes = Base64.getDecoder().decode(url);
|
|
|
+ String originalString = new String(decodedBytes);
|
|
|
+ log.info("sendGet url={}", originalString);
|
|
|
+ return httpPoolClient.get(originalString);
|
|
|
}
|
|
|
}
|