Uploading Content from Your Local Storage

If you are looking to upload files larger than 5GB, please see our documentation on using Multipart Upload

1. Create an upload ticket

If your content is not stored in the cloud and is instead stored in a location that is not accessible via the internet, then you can upload your content to MediaSilo's S3 buckets, where it can then be ingested into MediaSilo. Our S3 buckets are available to customers who need to upload content to MediaSilo but are not able to use their own cloud storage.

You will have write access to our ingest buckets. However, you will not be able to read anything or retrieve any content. All bucket content is scoped to your account, so you have access to no one's content but your own.

The following three steps describe how you can create a new file in MediaSilo from a file stored locally. The first step is to create an upload ticket.

curl --request POST \
  --url https://api.shift.io/v3/assets/upload \
  --header 'accept: application/json' \
  --header 'content-type: */*' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'
  --data '{ "fileName": "rough-cut-01.mp4" }'

You'll receive a response like the following. It contains all we need to start the upload to MediaSilo's S3 buckets.

    "assetUrl": "https://s3.amazonaws.com/ingest-east.mediasilo.com/26a35865-ffff-bbbb-b9af-1999d2c7835b/myfile.mov",
    "amzDate": "Mon, 19 Jan 2020 19:17:33 GMT",
    "amzAcl": "private",
    "contentType": "video/mp4",
    "authorization": "AWS AKIAIFFFICBLRC7JU6RA:bF4dV+HkF30vCct4V1/uRKjPDFo=",
    "httpMethod": "PUT"
assetUrlThis is the URL to be used in your subsequent POST. It must remain unchanged.
amzDateThe date of the request. Must remain unchanged.
amzAclAlways private. Files uploaded this way are not publicly accessible. Requesting the file after upload will result in a 403 error. Only MediaSilo servers can access the uploaded file.
contentTypeThe file's content mime type which was automatically determined.
authorizationThis is is a one time, time limited signature that acts as an authentication string. Must remain unchanged.
httpMethodThe suggested method for file upload.

2. Upload the file to MediaSilo's S3 Bucket

File upload can be done in a browser (via JavaScript) or using any number of server side languages (Java, PHP, Python, Node, etc.). The following cUrl example shows how to map the response from the upload ticket above to a well-formed file upload request to MediaSilo's S3 bucket.

curl -X PUT "**assetUrl**" -H "Authorization: **authorization**" -H "x-amz-acl: **amzAcl**" -H "Content-Type: **contentType**" -H "x-amz-date: **amzDate**" -T **path/to/local/file**


Be sure that the request is accurate

If you have any trouble getting this request to work, make sure that the response from step 1 matches the inputs for step 2. This is the most common mistake when uploading.

3. Creating a New File in MediaSilo

Calling the Asset Create endpoint will create a new file in MediaSilo from the given URL. Here's an example.

curl --request POST \
  --url https://api.shift.io/v3/assets \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'
  --data '{
    "sourceUrl": "YOUR_SIGNED_URL_FROM_ABOVE",
    "projectId": "0XXXCC-014B-2XX0-CF518DXXXX393E"


Project ID

Notice the above request has a project ID. All of your media in MediaSilo is organized into projects. In order to create a new file in MediaSilo you need to pass in the ID of the project in which you want to create the new file. Use the Projects endpoint to retrieve the projects you have access to.

4. Check Asset Encoding Progress

Before using the newly added asset in MediaSilo, you will need to make sure the encoding process has completed. You can do this by calling Get Asset Encoding Progress. When the progress equals 100, that means your file is ready to be used.

curl --request POST \
  --url https://api.shift.io/v3/assets/assetUuid/encode/progress  \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'