How to pre-import files from Swift object storage - Video CDN

How to pre-import files from Swift object storage - Video CDN

How to pre-import files from Swift object storage - Video CDN

This guide relates to Swift object storage.

 

Preparations

Let’s assume you already have a file uploaded to a Swift bucket and you want to distribute it via a CDN.

First, you need access to the storage. In our example, we have the following rclone configuration:

[My_Swift_Storage] tenant = 92284723 # <= project tenant_domain = default domain = default auth_version = 3 type = swift endpoint_type = public user = 89347832 # <= user key = WMTle7-FzsHu4Vpbm2qL # <= password auth = https://swift.example.com/v3 # <= endpoint (web domain and path)

 

These are generic Swift credentials. They don’t specify which particular bucket we can access. However, we know the bucket we’ll be uploading files to is called ballads.

We can form the storage URL in the following format: swift://<user>:<project>:<password>@<endpoint>/<bucket>/

swift://89347832:92284723:WMTle7-FzsHu4Vpbm2qL@swift.example.com/v3/ballads/

Save this URL somewhere — we’ll need it later.

Configuring files import from origin

  1. Go to Resources.

  2. Select the required resource

  3. Then open the File Import tab and click Add new source:

Resource without import methods configured

A dialog will appear:

1cb2f0e1-971c-40f8-b48d-52fc75fcf3c0.jpg

 

  1. In it, select the Storage sync tab and choose Import from: Swift.

  2. Paste the Swift storage URL into the form.

  3. Click Add new source. You will be redirected to the import settings page for the resource:

c7ac9cd1-3320-48e6-a151-fa559c1486f3.jpg

 

Here, you can see the newly added origin.

Now, wait for the files to be processed. If your files are not massive (i.e., not tens of gigabytes), 5–10 minutes should be enough for the import to complete.

Check the result

Once the origin has been scanned and the files imported, you’ll find them listed in the Files section — ready for Video CDN to distribute.

92b629cc-125c-4fdc-9fae-aa6a1a9092ea.jpg

 

Now you can fetch the files via HTTP. You should form the download url in the following format: https://<domain>/<filename>

In our tutorial, we assume we get system domain vcdn10000000.blazingcdn2.net and file SampleVideo_640x360_10mb.mp4. So the final url will be:

https://vcdn10000000.blazingcdn2.net/SampleVideo_640x360_10mb.mp4