Webhooks
Receive upload completion and video streaming readiness on your application server.
Browser events update the upload interface. Webhooks notify your server independently of the browser, so your application can save the uploaded video's IDs and react when streaming becomes available.
Configure a webhook using the webhook guide. The browser's upload-success event and server notifications can arrive in either order.
Upload workflow
- Your server creates an Upload session and saves its ID with your application's video record. Set
create_asset: trueif the uploaded video should also become a video asset for streaming. - Your server returns the single or multipart session fields through the uploader's
uploadprovider. - The component transfers the file to storage, then confirms completion. Chunkify validates the file and creates its Source. The component emits
upload-successafter the 204 response. - Handle
upload.completedon your server to save the Source ID and any automatically created video asset ID. Streaming preparation continues separately. - If you requested a video asset, handle
asset.playback_readyto receive its playback URLs when the stream is available.
Events to handle
| Event | What your application can do |
|---|---|
upload.completed |
Read data.source.id and data.upload. Save data.upload.asset_id if a video asset was requested. |
upload.failed |
Record that Chunkify permanently rejected the upload. |
upload.expired |
Record that the Upload did not complete before expiration. |
asset.playback_ready |
Save the video asset's playback URLs for your player. Its poster and timeline previews may not be available yet. |
asset.ready |
Playback, the poster, and timeline previews are ready. Save the poster and timeline preview URLs for your player. |
asset.failed |
Handle a video asset that could not be prepared. |
A browser error does not necessarily produce upload.failed. Temporary transfer or completion failures can leave the Upload waiting. A lost completion response can also make the browser show an error after the Upload has completed.
Use the webhook or a server-side Upload read to reconcile the result. Handle duplicate deliveries without repeating your application's action. See webhook verification for signature handling.
Upload metadata is copied to the Source and any automatically created video asset. Set your application's video ID in the Upload metadata to associate these resources with your own record.
For uploads used only for transcoding, omit create_asset. After upload.completed, use the Source ID to create a Job when needed. See Video upload.