AWS S3 File Uploads

Video files can be uploaded to AWS S3. This method will improve upload speed by using geographically closest S3 server and Amazon’s *S3 Transfer Acceleration* technology.


S3 file uploads are limited to files less than 5GB in size. For larger files, a different upload method will need to be used.

Two-step process

S3 file upload is done using a two-step process:

  • First, /videos/create or /videos/update API call is done. The call will return an upload URL.
  • Second, the file is submitted to this upload URL using HTTP PUT method.

Upload URL

Response of the create or update API call includes a link block with parameters that should be used to construct the upload URL. For example, response of the /videos/create API call:

<?xml version="1.0" encoding="UTF-8"?>
  <video key="tL17msiU">

The upload URL should be concatenated from the parts of the link block using the following scheme:

upload_url = <link/protocol> + "://" + <link/address> + <link/path> +
    "?AWSAccessKeyId=" + <link/query/AWSAccessKeyId> +
    "&Expires=" + <link/query/Expires> +
    "&Signature=" + urlencode(<link/query/Signature>)

That should produce the following upload URL using response example from above:

Uploading File

After upload URL has been constructed, it can be used to upload file using, for example, curl tool:

curl --request PUT --upload-file /file_path/file_name.mp4 \