You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
812 B

  1. namespace Learun.Application.WeChat
  2. {
  3. class MediaUpload : OperationRequestBase<MediaUploadResult, HttpPostFileRequest>
  4. {
  5. private string url = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type={0}";
  6. protected override string Url()
  7. {
  8. return string.Format(url, type);
  9. }
  10. /// <summary>
  11. ///
  12. /// </summary>
  13. /// <returns></returns>
  14. [IsNotNull]
  15. public string type { get; set; }
  16. /// <summary>
  17. /// 文件地址
  18. /// </summary>
  19. /// <returns></returns>
  20. public string media { get; set; }
  21. protected override string HttpSend(IHttpSend httpSend,string url)
  22. {
  23. return httpSend.Send(url, media);
  24. }
  25. }
  26. }