Package com.bytedesk.wechat.work.upload
Class WeChatWorkUploadController
java.lang.Object
com.bytedesk.wechat.work.upload.WeChatWorkUploadController
@RestController
@RequestMapping("/api/v1/wechat/work/upload")
public class WeChatWorkUploadController
extends Object
企业微信附件上传控制器
- Author:
- kefux.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<?>
uploadAttachment
(String mediaType, Integer attachmentType, org.springframework.web.multipart.MultipartFile file) 上传附件资源org.springframework.http.ResponseEntity<?>
uploadMomentImage
(org.springframework.web.multipart.MultipartFile file) 上传朋友圈图片附件org.springframework.http.ResponseEntity<?>
uploadMomentVideo
(org.springframework.web.multipart.MultipartFile file) 上传朋友圈视频附件org.springframework.http.ResponseEntity<?>
uploadProductImage
(org.springframework.web.multipart.MultipartFile file) 上传商品图册图片附件
-
Field Details
-
weChatWorkUploadService
-
-
Constructor Details
-
WeChatWorkUploadController
public WeChatWorkUploadController()
-
-
Method Details
-
uploadAttachment
@PostMapping("/attachment") public org.springframework.http.ResponseEntity<?> uploadAttachment(@RequestParam(required=false,defaultValue="image") String mediaType, @RequestParam(required=false,defaultValue="1") Integer attachmentType, @RequestParam("file") org.springframework.web.multipart.MultipartFile file) 上传附件资源- Parameters:
mediaType
- 媒体文件类型,分别有图片(image)、视频(video)、普通文件(file)attachmentType
- 附件类型,不同的附件类型用于不同的场景。1:朋友圈;2:商品图册file
- 要上传的文件- Returns:
- 上传结果
-
uploadMomentImage
@PostMapping("/moment/image") public org.springframework.http.ResponseEntity<?> uploadMomentImage(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) 上传朋友圈图片附件- Parameters:
file
- 要上传的图片文件- Returns:
- 上传结果
-
uploadMomentVideo
@PostMapping("/moment/video") public org.springframework.http.ResponseEntity<?> uploadMomentVideo(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) 上传朋友圈视频附件- Parameters:
file
- 要上传的视频文件- Returns:
- 上传结果
-
uploadProductImage
@PostMapping("/product/image") public org.springframework.http.ResponseEntity<?> uploadProductImage(@RequestParam("file") org.springframework.web.multipart.MultipartFile file) 上传商品图册图片附件- Parameters:
file
- 要上传的图片文件- Returns:
- 上传结果
-