Skip to content

Commit

Permalink
新增文件上传多参数方法
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanxiaotian committed Aug 24, 2018
1 parent 54d495a commit 19bb85d
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public void upLoadFile(String url, Object object, Map<String, RequestBody> map,
.subscribe(fileUploadObserver);
}

public Observable<ResponseBody> upLoadFile(String url, Object object, Map<String, RequestBody> map) {
return create(APIFunction.class)
.uploadFile(url, new ProgressResponseBody(object), map);

}

/**
* 单上传文件的封装 无参数
*
Expand All @@ -120,13 +126,6 @@ public void upLoadFile(String url, Object object, BaseFileObserver fileUploadObs
.subscribe(fileUploadObserver);
}


/**
* 单上传文件的封装 无参数
*
* @param url 完整的接口地址
* @param file byte[] 需要上传的文件
*/
@SuppressWarnings("ALL")
public Observable<ResponseBody> upLoadFile(String url, Object object) {
return create(APIFunction.class)
Expand Down

0 comments on commit 19bb85d

Please sign in to comment.