Upload File
POST/api/v5/repos/:owner/:repo/file/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
filefilerequired
File (up to 20M)
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- 1
Schema
successinteger
pathstring
full_pathstring
{
"success": 0,
"path": "string",
"full_path": "string"
}
Successful Example
{
"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"
}