Chunkify Uploader

Webhooks

Upload process with webhook notifications. Learn to handle events to manage video uploads and start transcoding jobs.

The component confirms upload completion in the browser. Webhooks let your backend receive the result independently of the browser and use the Source for encoding.

See the webhooks documentation for configuration and delivery handling.

Upload workflow

  1. Your backend creates an Upload and saves its ID with the relevant record in your application.
  2. Your backend returns upload_url and completion_url to the component through its upload provider.
  3. The component sends the file to storage with PUT, then calls the completion URL with POST. Chunkify checks the uploaded media and creates the Source before completing the Upload.
  4. The component emits upload-success after the completion response. Your backend receives upload.completed, whose payload includes source_id, and can create an encoding job.

Upload events

  • upload.completed means the Upload completed and the Source was created. Save source_id to associate the media with your application record.
  • upload.failed means Chunkify rejected the upload permanently. A browser error alone does not necessarily cause this event; temporary completion errors can leave the Upload waiting.
  • upload.expired means the Upload did not complete before its expiration. The file may already have reached storage.

Browser and webhook delivery can arrive in either order. Handle webhook redelivery without repeating your application action. A lost browser completion response can leave the component showing an error even if Chunkify completed the Upload. The webhook or a backend read of the Upload tells you its persisted status.

The component's success event contains the selected File, but no Source ID. If your UI needs the Source ID, obtain it through your application's backend. Keep the project token on the server.

Upload metadata is copied to the Source. Set metadata when your backend creates the Upload to associate it with an application record or user.