Upload Image
POST/api/v5/repos/:owner/:repo/img/upload
Request
Path Parameters
owner stringrequired
Repository space address (address path of the enterprise, organization, or individual)
repo stringrequired
Repository path (path)
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
bodystringrequired
File content in base64 format (Data URL prefix removed) (size limit: 20MB)
file_namestringrequired
File name
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
successinteger
pathstring
full_pathstring
{
"success": 0,
"path": "string",
"full_path": "string"
}
{
"success": true,
"path": "uploads/4c98ad75-729f-49ce-82ab-b41c1f7ffc90/test3.txt",
"full_path": "https://gitcode.com/xiaogang/test/attachment/uploads/4c98ad75-729f-49ce-82ab-b41c1f7ffc90/test3.txt"
}