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.

MediaUpload.cs 812 B

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