diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-01-07 13:37:14 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-01-07 13:37:14 +0100 |
commit | 1886d727f738895bb552151d59d4024f405522e2 (patch) | |
tree | 684b1abde7d7951456a8bb0956867a953971f5eb /doc | |
parent | 09216e8bbdd82e46705888aba13405a2fd191100 (diff) | |
download | gitlab-ce-1886d727f738895bb552151d59d4024f405522e2.tar.gz |
Add API project upload endpoint
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/projects.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md index 0ca81ffd49e..37d74216c1b 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -482,6 +482,34 @@ Parameters: - `id` (required) - The ID of a project +## Uploads + +### Upload a file + +Uploads a file to the specified project to be used in an issue or merge request description, or a comment. + +``` +POST /projects/:id/uploads +``` + +Parameters: + +- `id` (required) - The ID of the project +- `file` (required) - The file to be uploaded + +```json +{ + "alt": "dk", + "url": "/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png", + "is_image": true, + "markdown": "![dk](/uploads/66dbcd21ec5d24ed6ea225176098d52b/dk.png)" +} +``` + +**Note**: The returned `url` is relative to the project path. +In Markdown contexts, the link is automatically expanded when the format in `markdown` is used. + + ## Team members ### List project team members |