修复重构loader后,http上传失败的问题
This commit is contained in:
@@ -35,6 +35,7 @@ public class HttpOption extends BaseOption {
|
||||
private Proxy proxy;
|
||||
private boolean useServerFileName = false;
|
||||
private IHttpFileLenAdapter fileLenAdapter;
|
||||
private String attachment;
|
||||
|
||||
public HttpOption() {
|
||||
super();
|
||||
@@ -84,6 +85,19 @@ public class HttpOption extends BaseOption {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置文件上传需要的key
|
||||
*
|
||||
* @param attachment 如果为空,默认为"file"
|
||||
*/
|
||||
public HttpOption setAttachment(String attachment) {
|
||||
if (TextUtils.isEmpty(attachment)) {
|
||||
attachment = "file";
|
||||
}
|
||||
this.attachment = attachment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 给url请求添加Header数据
|
||||
* 如果新的header数据和数据保存的不一致,则更新数据库中对应的header数据
|
||||
|
||||
Reference in New Issue
Block a user