feat: (REQ-3540) wps编辑-构建请求上传地址的header信息
This commit is contained in:
parent
4c0bd16765
commit
bf8448bc18
@ -71,17 +71,27 @@ public class WpsEditManager {
|
||||
.fileKey(fileKey)
|
||||
.build());
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
||||
|
||||
return WpsEditUploadAddressResponse.builder()
|
||||
.url(response.getSignUrl())
|
||||
.method("PUT") //上传文档的 HTTP Method,(WPS)暂只支持 PUT,文件实体将在 Body 传递
|
||||
.headers(null)
|
||||
.headers(this.buildUploadAddressHost(response))//构建请求上传地址的header信息
|
||||
.params(null)
|
||||
.sendBackParams(null)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建请求上传地址的header信息
|
||||
*/
|
||||
private Map<String, String> buildUploadAddressHost(ApiSignUrlUploadResponse response) {
|
||||
Map<String, String> header = new HashMap<>();
|
||||
header.put("Content-Type", "multipart/form-data");
|
||||
header.put("Host", response.getHost());
|
||||
return header;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文档编辑
|
||||
* 3 上传完成后,回调通知上传结果
|
||||
|
||||
Loading…
Reference in New Issue
Block a user