Add Media To Event Photo Gallery
This endpoint allows the manager to add a new Media to the photo gallery for the
event identified by {id}
.
The client must split the file into chunks and send to the server in
series (Chunk Upload Media). After all the chunks have been
uploaded the client must call the Chunk Upload Complete
endpoint with the given upload_id
parameter to finalize the upload and retrieve
the Media.
info
This operation requires authentication and that the user is the manager of the event.
The user who adds the media to the photo gallery must be the same user who uploaded the media.
HTTP Request
POST /api/v2/event/{id}/gallery/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | A unique integer value identifying this event |
media | body | integer | true | id of Media to add to the photo gallery |
Example Request
- JavaScript
- Bash
const inputBody = '{
"users": ["integer"]
}';
const headers = {
'Content-Type':'application/x-www-form-urlencoded',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/event/{id}/gallery/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X POST /api/v2/event/{id}/gallery/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
--DATA '{body}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Media |