fix upload log

pull/21/head
fengyuecanzhu 3 years ago
parent 8c59264063
commit 1fb176c260
  1. 5
      app/src/main/java/xyz/fycz/myreader/ui/activity/AboutActivity.java

@ -24,6 +24,7 @@ import xyz.fycz.myreader.base.observer.MyObserver;
import xyz.fycz.myreader.common.APPCONST;
import xyz.fycz.myreader.common.URLCONST;
import xyz.fycz.myreader.databinding.ActivityAboutBinding;
import xyz.fycz.myreader.model.user.UserService;
import xyz.fycz.myreader.ui.dialog.DialogCreator;
import xyz.fycz.myreader.ui.dialog.LoadingDialog;
import xyz.fycz.myreader.ui.dialog.MyAlertDialog;
@ -165,7 +166,9 @@ public class AboutActivity extends BaseActivity<ActivityAboutBinding> {
Observable.create((ObservableOnSubscribe<String>) emitter -> {
File zipFile = FileUtils.getFile(logZip);
if (ZipUtils.zipFile(logDir, zipFile)) {
emitter.onNext(OkHttpUtils.upload(URLCONST.LOG_UPLOAD_URL, logZip, fileName));
emitter.onNext(OkHttpUtils.upload(
URLCONST.LOG_UPLOAD_URL + "?action=log" + UserService.INSTANCE.makeAuth(),
logZip, fileName));
} else {
emitter.onError(new Throwable("日志文件压缩失败"));
}

Loading…
Cancel
Save