The FileUploadComplete event is triggered after a video file is uploaded to ApsaraVideo VOD. This event includes notification content and callback examples.
Event type
FileUploadComplete
Event description
ApsaraVideo VOD generates the FileUploadComplete event after it receives an uploaded video file.
Event notification content
|
Parameter Name |
Type |
Required |
Description |
|
EventTime |
String |
Yes |
The time when the event was generated, in UTC format: yyyy-MM-ddTHH:mm:ssZ. |
|
EventType |
String |
Yes |
The event type. The value is fixed to FileUploadComplete. |
|
VideoId |
String |
Yes |
The ID of the video. |
|
Size |
Long |
No |
The size of the uploaded file. Unit: bytes. |
|
FileUrl |
String |
No |
The URL of the uploaded file. |
|
Status |
String |
Yes |
The upload result of the file.
|
|
Extend |
String |
No |
Custom parameters in JSON string format. |
Because ApsaraVideo VOD supports resumable upload, the service cannot determine whether an upload is interrupted or has failed. Therefore, no notification is sent for failed uploads.
Sample callbacks
The following example shows the callback content:
-
For an HTTP callback, the following content is the HTTP POST body.
-
For an MNS callback, the following content is the message body.
{
"Status": "success",
"EventTime": "2017-03-20T07:49:17Z",
"EventType": "FileUploadComplete",
"VideoId": "43q91jdh7df****",
"Size": 1439213,
"FileUrl":"http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/27ffc438-164h67f57ef-0005-6884-51a-1****.mp4",
"Extend": "{\"test\":\"your extend data\"}"
}