Commit 9f624a42 authored by liuyang's avatar liuyang

APK图片抓取识别及轮播流地址抓取,修复ftp无法上传bug

#BYLSERVER-1438
parent f463fcbd
......@@ -329,15 +329,15 @@ class Task : IAppBaseCallback {
.setUsernameAndPassword(Config.instance.getFtpUserName(), Config.instance.getFtpPassword())
.setNotificationConfig(UploadNotificationConfig())
.setCreatedDirectoriesPermissions(UnixPermissions("777"))
.setSocketTimeout(5000)
.setConnectTimeout(5000)
.setSocketTimeout(15000)
.setConnectTimeout(15000)
.setDelegate(uploadImageCallback())
.setMaxRetries(4)
this.uploadImages.forEach {
val uploadFile = File(it)
if (uploadFile.exists()) {
uploadRequest.addFileToUpload(it, Config.instance.getFtpRemotePath() + "/" + uploadFile.name)
uploadRequest.addFileToUpload(it, Config.instance.getFtpRemotePath() + uploadFile.name)
}
}
......
......@@ -51,7 +51,7 @@ class Config: IProtocolConfig {
fun getFtpRemotePath(): String {
if (isDebug)
return "/upload"
return "/test"
return "/"
}
companion object {
......
......@@ -97,7 +97,8 @@ public class FTPUploadTask extends UploadTask implements CopyStreamListener {
Logger.debug(LOG_TAG, "Socket timeout set to " + ftpParams.socketTimeout
+ "ms. Enabled control keep alive every " + controlKeepAliveTimeout + "s");
ftpClient.enterLocalPassiveMode();
// ftpClient.enterLocalPassiveMode();
ftpClient.enterLocalActiveMode();
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
ftpClient.setFileTransferMode(ftpParams.compressedFileTransfer ?
FTP.COMPRESSED_TRANSFER_MODE : FTP.STREAM_TRANSFER_MODE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment