This topic describes the features of the upload SDK. This topic also describes how to use the upload SDK.

Background information

The upload SDK is an important part of ApsaraVideo. It supports interactions between clients and Alibaba Cloud and is used to upload media files to ApsaraVideo VOD for storage. You can use the upload SDK to upload various media files in a fast and convenient manner, including video, audio, image, and subtitle files. ApsaraVideo VOD provides various types of upload SDKs, such as SDKs for servers, web clients, and mobile clients. The upload SDK fully adapts to all mainstream platforms and runtime environments.

Preparations

  • Service activation
  • Account preparation

    An AccessKey pair is created to access ApsaraVideo VOD. For more information, see Overview.

    • To upload media files from servers, we recommend that you use the AccessKey pair of a RAM user. You can create a RAM user in the Resource Access Management (RAM) console and grant the RAM user the permissions on ApsaraVideo VOD. For example, you can attach the AliyunVODFullAccess policy to the RAM user. For more information, see Create and grant permissions to a RAM user.
    • To upload media files from clients, you must first configure a RAM user. Then, use the AccessKey pair of the RAM user to call an operation for media upload to obtain the upload URL and credential. Deliver the upload URL and credential to the client and start the upload. For more information, see Upload URLs and credentials.
    Warning To protect the AccessKey pair of your Alibaba Cloud account, we recommend that you use the AccessKey pair of a RAM user to perform operations.
  • Development environments
    • Client upload SDKs allow you to upload media files from web pages, PCs, or mobile terminals that run an iOS or Android operating system.
    • Server upload SDKs support multiple platforms and runtime environments, such as Linux, Windows, and macOS.
    Note You must install the compiler or interpreter of your development language and configure the environment in advance.

Upload from clients

When media files are uploaded from clients, the files are uploaded to Object Storage Service (OSS) buckets allocated by ApsaraVideo VOD without passing through servers. Therefore, the clients must be authenticated. You must deploy the authorization service on the AppServer. Client upload SDKs support the following authorization methods:

Note STS requires complicated configurations. We recommend that you use upload URLs and credentials to upload media files. For more information about the differences between the two methods, see Comparison between credentials and STS.

ApsaraVideo VOD provides the following client upload SDKs:

Upload from servers

A server upload SDK encapsulates the underlying logic for obtaining and parsing upload URLs and credentials and uploading files to ApsaraVideo VOD for storage. You can upload a file only by deploying the server upload SDK on the AppServer and specifying the AccessKey pair and the path of the file. ApsaraVideo VOD provides the following server upload SDKs: