# Upload Arraignment Material
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
uploadMediaToCodeAudit
# Functional description
Calling this interface can upload the Mini Program page screenshot and the operation video screen, and bring the relevant parameters to the trial, which can help the auditor to judge.
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/wxa/uploadmedia?access_token=ACCESS_TOKEN
# Third Party Invocation
The calling method and parameters are the same as HTTPS, only the calling token is different
The permission set id to which this interface belongs is: 18
After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant
# Request parameters
attribute | type | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Third Party Platform Interface Invocation Voucherauthorizer_access_TokenThis parameter is URL Parameters, non Body Parameters. |
media | formdata | yes | Image (image): 2M, PNG supportJPEGJPGGIF format Video (video): 10MB, support MP4 format After uploading the material, using the returned mediaid, you can use the post in the arraignment interface. preview_Info Complete picture and video upload. NOTE: The returned medians Valid for three days, expired need to re-upload |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
type | string | type |
medians | buffer | Media id |
# Call Example
Example Dxplaination: Examples of Pictures
# Sample Request Data
curl -F average=@test.jpg "https://api.weixin.qq.com/wxa/uploadmedia?access_token=ACCESS_TOKEN"
# Return Data Example
{
"errcode":0,
"errmsg":"ok",
"type":"image",
"mediaid":"xxxxxxxxxx"
}
Example Dxplaination: Pass mp4 example
# Sample Request Data
curl -F media= @xxx.m p4 "https://api.weixin.qq.com/wxa/uploadmedia?access_token=ACCESS_TOKEN"
# Return Data Example
{
"errcode":0,
"errmsg":"ok",
"type":"video",
"mediaid":"xxxxxxxxxx"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
43002 | require POST method | Need POST request |
41005 | media data missing | Lack of multimedia file data, transfer material without video or picture content |
40006 | invalid meida size | Upload Material File Size Exceeds Limit |
40005 | invalid file type | Upload material file format is not correct |