Add a photo or video to a contribution.
Currently the following file formats are supported:
.png
, .jpg
, .jpeg
, .gif
.mov
, .mpeg4
, .avi
, .wmv
, .flv
, .3gpp
, .3gpp2
, .webm
.wave
, .wav
, .mp3
, .3gpp
, .3gpp2
POST /api/projects/:project_id/contributions/:contribution_id/media/
Parameter | Type | Description |
---|---|---|
project_id |
Integer |
Unique identifier for the project. |
contribution_id |
Integer |
Unique identifier for the contribution. |
Header | Required value |
---|---|
Content-Type |
multipart/form-data |
---XXX---
Content-Disposition: form-data; name="name"
Photo of the playground
---XXX---
Content-Disposition: form-data; name="description"
It clearly shows that the swing is broken
---XXX---
Content-Disposition: form-data; name="file"; filename="file.png"
Content-Type: image/png
---XXX---
The response contains a document attached to the contribution.
Code | Reason |
---|---|
201 | The document has been created successfully. |
404 | The project or contribution or document was not found. For security reasons we do not leak information about private projects, hence we don’t confirm existence private projects to unauthorised users. |