Here an example of workflow to upload videos

You can upload videos in two different ways, depending from the file size of content you have.
If file is smaller than 32MB, you can directly do that with this single call:

If file is larger, you need to do two steps:

  1. Generate the URL to upload the video [POST]
  2. Upload video on that URL [PUT]

It's mandatory specify the type and the size, this values needs to be coherent with the file you will upload or upload will fail.

Here an example of code:

let dataRequest = 'type=' + contentType + '&size=' + fileSize;
  type: "POST",
  url: '{idVideo}/signed', //create URL {"status" => "201", "signed_url" => "https://..."}
  data: dataRequest,
  cache: false,
  success: function (json) {
    let jsonParsed = JSON.parse(json);"PUT", jsonParsed.signed_url); // PUT call on URL