Applications are the building blocks of the mobile Internet. As they often require massive data upload and download, data security and reliability are extremely crucial. Now, developers can let Tencent Cloud COS handle data storage for them, allowing them to solely focus on the business logic of their applications with a lighter workload and higher development efficiency. This document describes how to quickly build a COS-based application transfer service to upload and download your application data through Tencent Cloud COS. All you need to do is deploy your business components and generate and manage temporary keys on your server.
COS provides a demo for XML, which you can run as instructed below.
Download the demo from the repository on GitHub.
- Do not expose your plaintext SecretId or SecretKey to any unsecure environments.
ShortTimeCredentialProviderauthorization method in the demo is simply used for demonstration purposes and should not be used in your production environment. Instead, we recommend authorizing via temporary keys.
- After the environment variables have been altered, you may need to restart Android Studio for the updated configuration to take effect.
Open the sample app, and you will see all the buckets that you have created.
Click New Bucket in the upper right-hand corner, enter the bucket name on the configuration page, and select the region in which the bucket resides.
Click on a bucket, and you will see all the files and folders that it contains.
On the file list page, click Upload in the upper right corner, and select the file to upload.
On the file list page, click Download below a file to directly download it.