Skip to content

Commit ed80cec

Browse files
committed
替换以file.api.weixin.qq.com域名下的api为api.weixin.qq.com,并使用https
1 parent 13d76c1 commit ed80cec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ public WxMediaUploadResult mediaUpload(String mediaType, String fileType, InputS
255255

256256
@Override
257257
public WxMediaUploadResult mediaUpload(String mediaType, File file) throws WxErrorException {
258-
String url = "http://file.api.weixin.qq.com/cgi-bin/media/upload?type=" + mediaType;
258+
String url = "https://api.weixin.qq.com/cgi-bin/media/upload?type=" + mediaType;
259259
return execute(new MediaUploadRequestExecutor(), url, file);
260260
}
261261

262262
@Override
263263
public File mediaDownload(String media_id) throws WxErrorException {
264-
String url = "http://file.api.weixin.qq.com/cgi-bin/media/get";
264+
String url = "https://api.weixin.qq.com/cgi-bin/media/get";
265265
return execute(new MediaDownloadRequestExecutor(this.wxMpConfigStorage.getTmpDirFile()), url, "media_id=" + media_id);
266266
}
267267

@@ -370,7 +370,7 @@ public WxMpMassUploadResult massNewsUpload(WxMpMassNews news) throws WxErrorExce
370370

371371
@Override
372372
public WxMpMassUploadResult massVideoUpload(WxMpMassVideo video) throws WxErrorException {
373-
String url = "http://file.api.weixin.qq.com/cgi-bin/media/uploadvideo";
373+
String url = "https://api.weixin.qq.com/cgi-bin/media/uploadvideo";
374374
String responseContent = execute(new SimplePostRequestExecutor(), url, video.toJson());
375375
return WxMpMassUploadResult.fromJson(responseContent);
376376
}

0 commit comments

Comments
 (0)