瀏覽代碼

限制端口号

tntdc 2 年之前
父節點
當前提交
b59e12d467
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      adm/src/main/java/com/minpay/common/util/FtpClientEntity.java

+ 1 - 0
adm/src/main/java/com/minpay/common/util/FtpClientEntity.java

@@ -100,6 +100,7 @@ public class FtpClientEntity
                  // 被动模式 TODO 阿里云需要放开所有端口
                  ftp.enterLocalPassiveMode();
                  //如果缺省该句 传输txt正常 但图片和其他格式的文件传输出现乱码
+                 ftp.setActivePortRange(10060, 10090);
                  boolean isFtp = ftp.storeFile(fileName, inputStream);
                  Log.info("是否真实上传成功:" + isFtp);
                  //关闭输入流