mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
替换以file.api.weixin.qq.com域名下的api为api.weixin.qq.com,并使用https
This commit is contained in:
parent
13d76c1c50
commit
ed80cece22
@ -255,13 +255,13 @@ public class WxMpServiceImpl implements WxMpService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxMediaUploadResult mediaUpload(String mediaType, File file) throws WxErrorException {
|
public WxMediaUploadResult mediaUpload(String mediaType, File file) throws WxErrorException {
|
||||||
String url = "http://file.api.weixin.qq.com/cgi-bin/media/upload?type=" + mediaType;
|
String url = "https://api.weixin.qq.com/cgi-bin/media/upload?type=" + mediaType;
|
||||||
return execute(new MediaUploadRequestExecutor(), url, file);
|
return execute(new MediaUploadRequestExecutor(), url, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public File mediaDownload(String media_id) throws WxErrorException {
|
public File mediaDownload(String media_id) throws WxErrorException {
|
||||||
String url = "http://file.api.weixin.qq.com/cgi-bin/media/get";
|
String url = "https://api.weixin.qq.com/cgi-bin/media/get";
|
||||||
return execute(new MediaDownloadRequestExecutor(this.wxMpConfigStorage.getTmpDirFile()), url, "media_id=" + media_id);
|
return execute(new MediaDownloadRequestExecutor(this.wxMpConfigStorage.getTmpDirFile()), url, "media_id=" + media_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ public class WxMpServiceImpl implements WxMpService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxMpMassUploadResult massVideoUpload(WxMpMassVideo video) throws WxErrorException {
|
public WxMpMassUploadResult massVideoUpload(WxMpMassVideo video) throws WxErrorException {
|
||||||
String url = "http://file.api.weixin.qq.com/cgi-bin/media/uploadvideo";
|
String url = "https://api.weixin.qq.com/cgi-bin/media/uploadvideo";
|
||||||
String responseContent = execute(new SimplePostRequestExecutor(), url, video.toJson());
|
String responseContent = execute(new SimplePostRequestExecutor(), url, video.toJson());
|
||||||
return WxMpMassUploadResult.fromJson(responseContent);
|
return WxMpMassUploadResult.fromJson(responseContent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user