All Products
Search
Document Center

Client upload

Last Updated: Aug 01, 2019

Overview

In client upload mode, you can upload local media files from mobile terminals or PCs to the bucket allocated by ApsaraVideo for VOD. Depending on the mobile terminals used, you can upload media files through an iOS or Android application or a web browser. On PCs, you can upload media files through a web browser. This mode applies to the upload of User Generated Content (UGC) and Professionally Generated Content (PGC) and the upload of media files in the backstage of the operation system.

The following figure shows the upload process.

Client upload process

Preparations

  • Register an Alibaba Cloud account, and activate ApsaraVideo for VOD.
  • Obtain an AccessKey to access ApsaraVideo for VOD. You can create an AccessKey for your Alibaba Cloud account on the Access Key Management page in the Alibaba Cloud console. Alternatively, you can create a RAM user in the RAM console and grant the user the permission (such as AliyunVODFullAccess) to access ApsaraVideo for VOD. For more information, see RAM user access.

Deploy the authorization service

In client upload mode, media files are uploaded to the OSS bucket allocated by ApsaraVideo for VOD without passing through the application server. Therefore, clients must be authenticated. That is, you need to deploy the authorization service on the application server.

Currently, client upload SDKs support the following authorization modes:

We recommend that you use upload URLs and credentials to upload files to ApsaraVideo for VOD by default. This mode is more advantageous over STS. For more information, see Comparison between upload (playback) credentials and STS.

Integrate client upload SDKs

ApsaraVideo for VOD provides the following client upload SDKs:

Features

Client upload SDKs support a variety of upload features and settings:

  • Multiple media file types: You can upload multiple types of local media files, including video, audio, and image files.
  • File list upload: You can use a file list to upload multiple files at a time. You can add files to or delete files from the file list, cancel or resume the upload, and enumerate or clear the file list.
  • Upload control: You can start, stop, pause, and resume the upload.
  • Resumable upload: An upload SDK automatically performs resumable upload and you do not need to worry about the break point and segment restoration. If the video upload fails due to an exception, the upload is resumed from the break point.
  • Network switching: You can enable your application to automatically pause the upload when the mobile terminal switches from Wi-Fi to a 3G or 4G network. This avoids consuming 3G or 4G traffic for the upload. When the mobile terminal switches back from the 3G or 4G network to Wi-Fi, the application can resume the upload. Note that the application needs to have the capability to determine whether the network switches between Wi-Fi and 3G or 4G.
  • Additional settings: For more information about other upload settings, see media upload overview.