| | |
| | | public String uploadAndMoveFile(String path, String fileName, String url, String newFilePath){ |
| | | try { |
| | | //上传文件 |
| | | boolean b = ftpUtil.uploadFile(path, fileName, url); |
| | | if(b){ |
| | | //移动文件 |
| | | boolean b1 = ftpUtil.moveFile(path + "/" + fileName, newFilePath); |
| | | if(b1){ |
| | | System.out.println("移动文件成功"); |
| | | return "上传文件成功"; |
| | | } |
| | | } |
| | | // boolean b = ftpUtil.uploadFile(path, fileName, url); |
| | | // if(b){ |
| | | // //移动文件 |
| | | // boolean b1 = ftpUtil.moveFile(path + "/" + fileName, newFilePath); |
| | | // if(b1){ |
| | | // System.out.println("移动文件成功"); |
| | | // return "上传文件成功"; |
| | | // } |
| | | // } |
| | | return "上传文件成功"; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |