update 固件上传到FTP服务器

This commit is contained in:
Guoqs
2024-06-03 14:36:49 +08:00
parent e6dc4d45d3
commit 5f2210ec79
3 changed files with 227 additions and 209 deletions

View File

@@ -99,12 +99,8 @@ public class CommonController {
// 上传文件路径
String filePath = JsowellConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
try {
FtpUtils.upLoad(filePath, file);
} catch (Exception e) {
log.error("FTP上传固件error", e);
}
// String fileName = FileUploadUtils.upload(filePath, file);
String fileName = FtpUtils.upLoad(filePath, file);
String url = serverConfig.getUrl() + fileName;
AjaxResult ajax = AjaxResult.success();
ajax.put("url", url);