Replacing a video
Replacing a video file is done by sending a PUT
request to the /videos/upload/[VIDEO_ID]
endpoint to replace the video file.
You will get a response containing a signed S3URL to upload the video file to.
When replacing a video, all old video files of this video will be deleted or overwritten. The replacement is irreversible.
Get signed URL
curl -X PUT https://app.ignitevideo.cloud/api/videos/upload/[VIDEO_ID] \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
Response
{
"videoId": "[VIDEO_ID]",
"signedUrl": "[SIGNED_URL]",
}
Upload video file
Upload your video file as a PUT
request to the signed URL returned in the previous step.
You have to pass the mime type of the file as Content-Type
header. You can get the mime type from your local video file via the file input element.
curl -X PUT [SIGNED_URL] \
-H "Content-Type: [MIME_TYPE]" \
--data-binary "@[PATH_TO_VIDEO_FILE]"
Encoding process
After the video file has been uploaded, the video will be encoded. This process can take a while, depending on the video size and encoding complexity.
You can check the encoding status of a video by calling the /videos/[VIDEO_ID]
endpoint as described in the get video section.