Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-01-08 23:29:43 +0300
committerRobert Speicher <robert@gitlab.com>2016-01-08 23:29:43 +0300
commitaf68897acda31a55093e2b5fdd7eba61e54b404c (patch)
treede423ec8ff971b5f2c42cb6810259d2fab82da67 /doc
parent6467448a1aaaa216560d35f2bd0ac4f8932f77ec (diff)
parent0614793b38db4711053cbcb4fa80d9c8cc492eec (diff)
Merge branch 'api-project-upload' into 'master'
Add API project upload endpoint Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4317 See merge request !2329
Diffstat (limited to 'doc')
-rw-r--r--doc/api/projects.md28
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