v3.6.6
laoyuyu 6 years ago
commit 6d06458df7
  1. 1
      Aria/src/main/java/com/arialyy/aria/core/common/ftp/IFtpUploadInterceptor.java
  2. 6
      aria/src/main/java/com/arialyy/aria/core/upload/UploadTask.java

@ -20,7 +20,6 @@ import java.util.List;
/** /**
* FTP文件上传拦截器如果远端已有同名文件可使用该拦截器控制覆盖文件或修改该文件上传到服务器端端文件名 * FTP文件上传拦截器如果远端已有同名文件可使用该拦截器控制覆盖文件或修改该文件上传到服务器端端文件名
* simple
* <pre> * <pre>
* <code> * <code>
* Aria.upload(this) * Aria.upload(this)

@ -17,6 +17,7 @@ package com.arialyy.aria.core.upload;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import com.arialyy.aria.core.common.IUtil;
import com.arialyy.aria.core.inf.AbsNormalTask; import com.arialyy.aria.core.inf.AbsNormalTask;
import com.arialyy.aria.core.inf.IUploadListener; import com.arialyy.aria.core.inf.IUploadListener;
import com.arialyy.aria.core.scheduler.ISchedulers; import com.arialyy.aria.core.scheduler.ISchedulers;
@ -31,7 +32,6 @@ public class UploadTask extends AbsNormalTask<UploadEntity, UTaskWrapper> {
mTaskWrapper = taskWrapper; mTaskWrapper = taskWrapper;
mOutHandler = outHandler; mOutHandler = outHandler;
mListener = new BaseUListener(this, mOutHandler); mListener = new BaseUListener(this, mOutHandler);
mUtil = new SimpleUploadUtil(taskWrapper, (IUploadListener) mListener);
} }
@Override public int getTaskType() { @Override public int getTaskType() {
@ -50,6 +50,10 @@ public class UploadTask extends AbsNormalTask<UploadEntity, UTaskWrapper> {
return mTaskWrapper.getEntity().getFileName(); return mTaskWrapper.getEntity().getFileName();
} }
@Override protected synchronized IUtil createUtil() {
return new SimpleUploadUtil(mTaskWrapper, (IUploadListener) mListener);
}
public static class Builder { public static class Builder {
private Handler mOutHandler; private Handler mOutHandler;
private UTaskWrapper mTaskEntity; private UTaskWrapper mTaskEntity;

Loading…
Cancel
Save