| | |
| | | boolean result = false; |
| | | InputStream input = file.getInputStream(); |
| | | try { |
| | | log.error("this is ftpinfo: " + config.getUrl()); |
| | | log.error("this is ftpinfo: " + config.getPasswd()); |
| | | log.error("this is ftpinfo: " + config.getPath()); |
| | | log.error("this is ftpinfo: " + config.getPort()); |
| | | log.error("this is ftpinfo: " + config.getUsername()); |
| | | connect(config); |
| | | ftpClient.setBufferSize(1024 * 1024); |
| | | // 设置缓冲区5M |
| | | ftpClient.setBufferSize(1024 * 1024 * 5); |
| | | result = ftpClient.storeFile(new String(name.getBytes(encoding), "iso-8859-1"), input); |
| | | if (result) { |
| | | log.error("上传成功!"); |