Skip to content

提审素材上传接口 #1866

Closed
Closed

Description

@yangyh22

微信第三方平台,待小程序实现业务,代码管理,提交审核,其中有一项是 预览信息说明 这个信息需要使用【提审素材上传接口】,这个接口在开发包中没有。使用WxService.post()自己实现的时候又因为是文件类型需要使用 MediaUploadRequestExecutor 但是默认的WxService.post()是 SimplePostRequestExecutor

官方文档地址

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/Mini_Programs/code/submit_audit.html

Activity

  1. yangyh22 commented on Nov 12, 2020

    @yangyh22
    Author

    换了一个实现方式可以上传成功,但是没有返回mediaid,代码如下所示
    WxMediaUploadResult execute = wxOpenMaService.execute(MediaUploadRequestExecutor.create(wxOpenMaService.getRequestHttp()), "https://api.weixin.qq.com/wxa/uploadmedia", tmpFile);
    但是,WxMediaUploadResult 中的字段名称是mediaId 而这个【提审素材上传接口】返回的是mediaid,所以我自定义了Result 以及相应的RequestExecutor。这个时候就能成功的拿到mediaid请问大佬们还有没有更好的解决方案。

  2. binarywang commented on Nov 12, 2020

    @binarywang
    Owner

    欢迎直接提交你实现好的代码,提交PR,这就是最好的解决办法

  3. added this to the 3.9.9 milestone on Nov 12, 2020
  4. added a commit that references this issue on Nov 14, 2020
  5. removed this from the 3.9.9 milestone on Nov 15, 2020
  6. added a commit that references this issue on Nov 24, 2020
  7. modified the milestones: 4.0.0, 4.0.1 on Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions