Skip to main content

UploadFile

Host: dip-cb.binanceapi.com

POST /mp-api/v1/apps/{appId}/files/upload

Header

ParameterRequiredDescription
X-Mp-Open-Api-TokenYesJWT token. Please refer to Description of External Interface Signature Authentication Algorithm

Body

Utilize FORM (multipart/form-data) for submissions. You can refer to the following articles for further understanding:

Like other requests, employ the full body for the signature.

Path Parameters

ParameterDescription
appIdThe AppId of the mini program

Note:

  1. There is a total upload count limit for each app. Please contact us if you encounter a limit error.

  2. Currently, we only support uploading a single file at a time.

  3. This API executes asynchronously. We will conduct a security check on the uploaded file. Use the returned fileId with GetFileStatus to verify whether the uploaded file has passed the check.

  4. The currently acceptable file content is in image format, conforming to the following rules:

    • Format: jpg or png
    • Size: Maximum 1MB
    • File name size: Maximum 60 characters (including extension)
  5. We recommend an image size ratio of:

    • Width: 516
    • Height: 375

    For sku images, if an image does not match this ratio, it will be cropped by our system when displayed.

Response

{
"code": "000000",
"message": null,
"data": {
"fileIds": ["f7574adb-0ccb-4281-9ed6-943f11a1e85a"]
},
"success": true
}
ErrorCodeRemark
000000Success
900001Invalid Parameter
900002JWT Authentication Failed
900003Unexpected Error
900231Rate Limit