Skip to content

Upload an attachment to a project wiki

POST
/api/v4/projects/{id}/wikis/attachments

Uploads a file to the uploads directory in a specified project wiki.

id
required
One of:
string

The ID or URL-encoded path of the group or project

Media typemultipart/form-data
object
file
required

The attachment file to be uploaded

string format: binary
nullable
branch

The name of the branch

string
nullable

Created

Media typeapplication/json
object
file_name
string
file_path
string
branch
string
link
object
url
string
markdown
string
Example
{
"file_name": "dk.png",
"file_path": "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"branch": "main",
"link": {
"url": "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
"markdown": "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)"
}
}

Bad Request

Not found