|
@@ -47,8 +47,8 @@ public class TECompareobjectRepeatController extends BaseController
|
|
|
private ITECompareobjectRepeatService tECompareobjectRepeatService;
|
|
|
|
|
|
|
|
|
-// String base = "/usr/local/nginx/html/";
|
|
|
-String base ="C:\\Program Files\\north\\image\\";
|
|
|
+ String base = "/usr/local/nginx/html/files/";
|
|
|
+//String base ="C:\\Program Files\\north\\image\\";
|
|
|
String ip="8.130.113.97";
|
|
|
String port="20000";
|
|
|
@PostMapping(value = "/code/{id}")
|
|
@@ -66,19 +66,19 @@ String base ="C:\\Program Files\\north\\image\\";
|
|
|
String password = "sys200888"; // 远程服务器密码
|
|
|
int port = 22;
|
|
|
String port2 = "20000";
|
|
|
- File localFile = new File(path);
|
|
|
- if (!localFile.exists()) {
|
|
|
- System.out.println("本地文件不存在: " + path);
|
|
|
- }
|
|
|
-
|
|
|
- try (FileInputStream fis = new FileInputStream(localFile)) {
|
|
|
- // 调用工具类上传文件
|
|
|
- SFTPFileUpload.uploadFile(fis, remoteDir, remoteHost, username, password, port, localFile.getName());
|
|
|
- System.out.println("文件上传11");
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- System.out.println("文件上传失败");
|
|
|
- }
|
|
|
+// File localFile = new File(path);
|
|
|
+// if (!localFile.exists()) {
|
|
|
+// System.out.println("本地文件不存在: " + path);
|
|
|
+// }
|
|
|
+//
|
|
|
+// try (FileInputStream fis = new FileInputStream(localFile)) {
|
|
|
+// // 调用工具类上传文件
|
|
|
+// SFTPFileUpload.uploadFile(fis, remoteDir, remoteHost, username, password, port, localFile.getName());
|
|
|
+// System.out.println("文件上传11");
|
|
|
+// } catch (IOException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// System.out.println("文件上传失败");
|
|
|
+// }
|
|
|
|
|
|
|
|
|
String url = "http://" + ip + ":" + port2 + "/files/files/" + id + ".png";
|