修复FTP上传进度保存失败问题
This commit is contained in:
@@ -17,7 +17,7 @@ public class AnyRunActivity extends BaseActivity<ActivityTestBinding> {
|
||||
int index = 0;
|
||||
//String URL = "http://static.gaoshouyou.com/d/12/0d/7f120f50c80d2e7b8c4ba24ece4f9cdd.apk";
|
||||
//String URL = "http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
||||
private final String URL = "ftp://192.168.29.140:21/download//AriaPrj.rar";
|
||||
private final String URL = "ftp://192.168.29.140:21/download/AriaPrj.rar";
|
||||
//String URL = "https://dl.genymotion.com/releases/genymotion-2.12.1/genymotion-2.12.1-vbox.exe";
|
||||
|
||||
@Override protected int setLayoutId() {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class AnyRunnModule {
|
||||
.loadFtp(url)
|
||||
.login("lao", "123456")
|
||||
//.addHeader("Accept-Encoding", "gzip")
|
||||
.setFilePath(Environment.getExternalStorageDirectory().getPath() + "/ftp_ggsg16.apk")
|
||||
.setFilePath(Environment.getExternalStorageDirectory().getPath() + "/")
|
||||
//.resetState()
|
||||
.start();
|
||||
//String[] urls = new String[] {
|
||||
|
||||
@@ -21,9 +21,9 @@ public class TestActivity extends BaseActivity<ActivityTestBinding> {
|
||||
String TAG = "TestActivity";
|
||||
//String URL = "http://58.210.9.131/tpk/sipgt//TDLYZTGH.tpk"; //chunked 下载
|
||||
//private final String URL = "ftp://192.168.1.3:21/download//AriaPrj.rar";
|
||||
private final String FILE_PATH = "/mnt/sdcard/SDK_Demo-release.apk";
|
||||
private final String FILE_PATH = "/mnt/sdcard/AriaPrj.rar";
|
||||
//private final String URL = "ftp://192.168.29.140:21/aa//你好";
|
||||
private final String URL = "http://192.168.29.140:5000/upload/";
|
||||
private final String URL = "ftp://192.168.29.140:21/upload/";
|
||||
|
||||
@Override protected int setLayoutId() {
|
||||
return R.layout.activity_test;
|
||||
@@ -76,18 +76,17 @@ public class TestActivity extends BaseActivity<ActivityTestBinding> {
|
||||
switch (view.getId()) {
|
||||
case R.id.start:
|
||||
Aria.upload(this)
|
||||
.load(FILE_PATH)
|
||||
.loadFtp(FILE_PATH)
|
||||
.login("lao", "123456")
|
||||
.setUploadUrl(URL)
|
||||
.setRequestMode(RequestEnum.POST)
|
||||
.setExtendField("韩寒哈大双")
|
||||
.setAttachment("file")
|
||||
.start();
|
||||
break;
|
||||
case R.id.stop:
|
||||
Aria.upload(this).load(FILE_PATH).stop();
|
||||
Aria.upload(this).loadFtp(FILE_PATH).stop();
|
||||
break;
|
||||
case R.id.cancel:
|
||||
Aria.upload(this).load(FILE_PATH).cancel();
|
||||
Aria.upload(this).loadFtp(FILE_PATH).cancel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user