-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
CP_多媒体文件管理
weisxing edited this page Jun 21, 2020
·
3 revisions
InputStream inputStream = ...;
File file = ...;
WxMediaUploadResult res = wxCpService.getMediaService().upload(mediaType, fileType, inputStream);
// 或者
res = wxCpService.getMediaService().upload(mediaType, file);
res.getType();
res.getCreatedAt();
res.getMediaId();
res.getThumbMediaId();
// 获得一个在系统临时目录的文件
File file = wxCpService.mediaDownload(media_id);