百度智能云

All Product Document

          Object Storage

          Object Upload, Download and Management

          Does BOS support to customize the file attributes?

          BOS supports the system Meta and customized Meta. The system Meta includes the Meta information maintained by BOS, such as Content-Length, Last-Modified. The customized Meta is < key, value> pair started with "x-bce-meta-". You can customize the meta to save the additional files attributes that you want to save, such as x-bce-meta-owner: xiaoming.

          How to update meta-data, such as content-type?

          You can update the meta-data by Copyobject. Just set the target file to be consistent with the source file, and add the meta-data you want to update/add. In addition, the console is about to introduce the function to set meta, and you can update the meta-data (such as content-type) on the console in the future.

          How to share files?

          BOS supports for file sharing, which is to share the file after the link for object file is obtained. For a private bucket, you can generate a time-sensitive temporary sharing link in the console or through SDK. Please refer to Download Object for generating sharing link via console; please refer to Java sdk Access Object URL.

          What's the difference between such upload interfaces like Putobject, Postobject, appendObject and MultipartUpload?

          These upload interfaces can all upload files. The main differences are shown as follows:

          • Putobject is used to upload small files in general.
          • Postobject is mainly used to upload files under a browser environment.
          • appendObject is mainly used for incremental upload scenarios, such as real-time upload of surveillance video, log transmission, etc. The Appendable files can be viewed any time.
          • MultipartUpload is mainly used to upload large files. MultipartUpload is to upload the file part by part after the large file is divided into parts, which improves the success rate and speed of the uploading. It shall be noted that, the file uploaded by MultipartUpload cannot be viewed from Listobjects until it has been uploaded (commit).

          Does Copyobject support cross-origin copy?

          Copyobject supports to copy object across regions. When an object is copied across regions, the flow generated by copy is charged for the cross-origin flow. Please refer to Pricing for cross-region charging standard.

          How to copy data across regions?

          The AIP interface supported by BOS Copyobject can realize the data copy. In order to facilitate your use, BOS console, CLI and SDK are encapsulated such interface. When you need to copy a large number of files across buckets, you can make it through SDK: First, get the list of files to be copied from Listobject, and then copy with Copyobject. It shall be noted that, you need to have the read permission for source files and write permission for target files in order to execute Copyobject. If the target bucket is owned by another user, you can ask the owner to set ACL for his/her bucket, so as to allow you for writing. Please refer to Bucket Access Control for more information.

          How to Upload the Large File?

          The file uploading program of BOS consist of data import services (Data Import, commonly known as "Disk Sending") and the command line tool CLI, SDK and Console.

          • If there are too many files to upload them over the network, the Data Import service is recommended for uploading. The Data Import service provides a quick way to import data by mailing a hard disk. If you are interested in it, please submit Ticket for consultation.
          • If there are moderate numbers of files or the network uplink bandwidth conditions are better, you may consider uploading files through CLI. CLI supports the breakpoint resume of large files. Please refer to BOS CLI as to how to use CLI for uploading. CLI is encapsulated based on BOS Python SDK, and if you need to upload the files in other language environments, you can also compile uploading code through BOS SDK.
          • When there are a small amount of files, you can also upload them directly through the administrative console.

          How to delete the files in BOS in Batch?

          BOS supports for batch deletion in a number of ways.

          • Log in the console and select multiple files to delete in batch.
          • BOS provides API interface for batch deletion DeleteMultipleobjects Interface, which can be used to delete multiple objects under a same bucket through an HTTP request.
          • Use the tool BOS CMD for batch deletion, and please refer to Delete Object for detailed operation guide.

          How to view if a certain file exists in the bucket quickly?

          Judge in a circulation manner through Listobjects Interface.

          Does BOS support for breakpoint resume?

          BOS does not support for breakpoint resume when using console to upload files, but BOS provides API interface, SDK and tools, all of which support for breakpoint resume.

          How to modify standard BOS into infrequent BOS?

          The lifecycle management allows you to convert the storage class from standard storage to infrequent storage, and the rules of BOS lifecycle will take effect within one day after they are set. After the rules take effect, BOS processes the eligible objects accordingly, but it takes some time (usually a few hours), so you may not see the effect immediately after the rules are set. The time calculated in the rules (namely the "age" of object) is based on the creation time of object, instead of the creation/modification time of the lifecycle rules. BOS only saves the last modification time, namely the last-modified time; if the meta is not updated or overrides files, the last-modified time is the creation time. So, the "creation time" in the lifecycle is actually the last-modified time.

          How does BOS upload and download files or folders?

          BOS supports to upload files in multiple ways as shown in the following:

          1.Use console to directly Upload Object.

          2.Use API or SDK for uploading and downloading; please refer to Simulated Folder Function for the uploading of folders;

          3.Use Peripheral Tool for uploading and downloading. The folder uploaded by Windows system can be realized by BOS Desktop tool.

          The console supports the uploading of 5G data at most, and SDK or peripheral tool is recommended for uploading and downloading or large files greater than 5G.

          How to set the header attributes of the files?

          Set via Copyobject Interface. Among them, the Copyobject can only modify userMeta, you need to set the content-type when uploading.

          Are the browser supported for uploading files?

          You can use bce bos uploader for implementation, and please refer to Web-end Direct Upload Practices.

          Can the data mistakenly deleted by BOS be retrieved?

          The user can configure the recycle bin function of bucket to ensure that the deleted data are retained in the recycle bin for subsequent retrieval of deleted data. By default, the recycle bin function of bucket is closed. Please refer to Recycle Bin for detailed description.

          How to set up to browse object instead of downloading it?

          If you want to set the resources accessing BOS for viewing rather than downloading it directly, you can specify it by setting the Meta information of object.

          Can the BOS file be automatically checked for MD5 after uploading?

          If you want to check the integrity of the uploaded file, you can use content_md5 parameters to verify the file data. After setting, BOS enables MD5 verification of file contents, and compares the MD5 provided with the MD5 of the file, and an error is prompted in case of inconsistency. When the multi-part uploading is used, it is recommended to use the Content-MD5 value returned by each block BOS to verify the correctness of the uploaded block data during the block uploading. When all part data is combined into one object, it no longer contains the MD5 value.

          The SDK provided by BOS supports MD5 verification, taking JAVA as an example, please refer to File Management for detailed description

          How does BOS access thumbnail?

          At present, BOS does not provide the interface to access the video cover stored and thumbnail. You are recommended to use VOD if you want to access the cover. Please refer to [Query Specific Media Data](https://cloud.baidu.com/doc/VOD/s/Wjwvyd4zo/#Query Specific Media Data) for specific interface .

          How to access the user and meta-data of object at the same time at the Listobjects interface?

          If you want to access the User and Meta information of object in batch, you can use GetobjectMeta Interface.

          Can a customized domain name be used as the access address for object of BOS?

          You can access after binding the bucket with the customized domain name. Please refer to Bind Bucket Domain Name for detailed operations to bind the domain name for detailed operations.

          Previous
          Bucket Access and Management
          Next
          API & SDK & Tool