Docs
ufile
Developer Guide
Object/File (Object)
Download file

Download Files

Simple Download

A simple download is done by the GetObject interface, which is used to download files (Objects) that have already been uploaded. Object downloads are accomplished through HTTP GET requests.

  • For Object URL generation rules, please see the Access to US3.

  • If you need to use a custom domain to access Object, please refer to Custom Domain Access to US3.

Resumable Download

US3 provides the feature to start downloading from a specified location in the Object. When downloading a large object, you can download it in multiple times. If the download is interrupted, you can also continue the download from the last completed location when restarted.

Similar to simple upload, you also need to have read permissions for the Object. Support for resumable downloads is enabled by setting the Range parameter. For larger Objects, it is recommended to use this feature. The definition of Range can be referred to HTTP RFC. If the Range parameter is used in the request header, the returned message will contain both the length of the entire file and the range returned this time. For example, Content-Range: bytes 0-9/44 means that the total length of the file is 44, and the range returned this time is 0-9. If it is not within the range, the whole file will be transferred, and Content-Range will not be mentioned in the result, and the return code is 206.

Delete File

Deleting a file means deleting the files (Objects) uploaded to the storage space (Bucket).

US3 allows you to perform the following delete actions:

  • Single delete: Delete a specific Object.

  • Automatic deletion: If the number of Objects to be deleted is large, and the Objects to be deleted have a certain regularity, such as regularly deleting Objects before certain days, or clearing the entire Bucket, it is recommended to use lifecycle management to automatically delete Objects. After setting the lifecycle rule, US3 will automatically delete expired Objects according to the rules, greatly reducing the number of times you send delete requests and improve the deletion efficiency.

Note: This feature is in the beta testing stage, if you need to use it, please contact technical support.