This topic describes how to obtain upload URLs and credentials when you use client upload SDKs to upload media files. The upload URLs and credentials are used to initialize upload instances.
Background information
- Authorization based on upload URLs and credentials.
- Authorization based on Security Token Service (STS) tokens.
Upload URLs and credentials are issued by ApsaraVideo VOD to authorize users to upload media files to OSS buckets allocated by ApsaraVideo VOD. Using upload URLs and credentials to upload media files is more advantageous over using STS. For more information about the advantages, see Comparison between credentials and STS. For more information about how to use STS tokens to upload media files, see Obtain an STS token.
Upload process
For more information about the upload process, see Upload processes.
Obtain upload URLs and credentials
We recommend that you integrate a server operation SDK of ApsaraVideo VOD to obtain upload URLs and credentials. This way, you do not need to calculate signatures yourself. The process varies based on the programming language you use. The following table describes the references for different programming languages.
Programming language | References |
---|---|
Java | |
Python | |
PHP | |
.NET | |
Node.js | |
Go | |
C or C++ |
Use upload URLs and credentials
Each file requires an upload URL and an upload credential. Therefore, you must obtain the upload URL and credential from the AppServer in the onUploadStarted callback and specify them in the upload instance. The process varies based on the environment you use. The following table describes the references for different environments.
Environment | References |
---|---|
Web | Upload SDK for JavaScript |
Android | Upload SDK for Android |
iOS | Upload SDK for iOS |
WeChat mini program | Upload SDK for WeChat mini programs |