Skip to content

Commit 54011ca

Browse files
author
huanglh
committed
将ttl放在textMap中
1 parent 46febff commit 54011ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/cn/jpush/api/file/FileClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ public FileUploadResult uploadFile(FileType type, String filename, Integer ttl)
5656
String url = _baseUrl + _filesPath + "/" + typeStr;
5757
Map<String, String> fileMap = new HashMap<String,String>();
5858
fileMap.put("filename", filename);
59-
fileMap.put("ttl",String.valueOf(ttl));
60-
String response = client.formUploadByPost(url, null, fileMap, null);
59+
Map<String, String> textMap = new HashMap<String,String>();
60+
textMap.put("ttl",String.valueOf(ttl));
61+
String response = client.formUploadByPost(url, textMap, fileMap, null);
6162
LOG.info("uploadFile:{}", response);
6263
return _gson.fromJson(response,
6364
new TypeToken<FileUploadResult>() {

0 commit comments

Comments
 (0)