event:s3success
This event is triggered once for each uploaded file after the upload is completed.
Available payload properties:
{
customerId: 12345,
mediaContainerId: 135790
}
Examples
Release mediacontainer after upload
Usage: Your account sets newly uploaded mediacontainers to “not released” by default, but for a specific securitygroup you want newly uploaded mediacontainers to be automatically released.
Event structure
{
"name": "event:s3success",
"flag": 0,
"conditions": {
"customerId": 12345 // add your customerId here
},
"instructions": [
{
"type":"api",
"method":"post",
"path":"v5/search",
"controller":"search",
"action":"search",
"payload":{
"searchTerm":":mediaContainerId",
"field": "id",
"controlGroupIds": [1234] // add the securityGroupId here
},
"expected":[{"path":"hits.total.value","value":1}]
},
{
"type":"api",
"method":"put",
"path":"v5/mediacontainer/:mediaContainerId",
"controller":"mediacontainer",
"action":"update",
"payload":{
"flag":0
}
}
],
"notes": "Update flag after update"
}
event:uploadComplete
This event is triggered once after an upload batch (which can contain one or more files) is completed. Every upload batch has a unique uploadId.
Available payload properties:
{
"uploadId": "abc123",
"mediaContainerIds": [123456, 234567, ...]
"mediaContainerId": 999 // only available for dropsite uploads
}
Examples
Inform after upload is complete
Usage: You can listen to the event “event:uploadComplete” to inform users about a completed (batch) upload.
Event structure
{
"name": "event:uploadComplete",
"flag": 2,
"conditions": {
"payload": {
"uploadId": "abc-123-def"
}
},
"instructions": [
{
"type": "email",
"template": "uploadComplete",
"subject": "Upload complete",
"to": [
{
"recipient": "jane@admiralcloud.com",
"language": "en"
}
],
"mediaContainerIds": ":mediaContainerIds"
}
]
}