You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Working with objects
Creating symlinks
Copy page
Download PDF
Creating symlinks
A symbolic link, or symlink, is a file that acts as a shortcut by storing a path to another file. You can quickly access frequently used objects through symlinks. Symlinks require very little storage space compared to objects, helping you save on storage costs. This topic covers symlink behavior, billing, and creation.​
Behavior description​
Symlinks support versioning, which allows different versions of symlinks to point to different objects. The content returned varies depending on the object accessed and the operation when accessing a symlink. The details are as follows:​
​
Operation​
Content returned​
When you use GetObject to download a symlink, the content returned varies depending on the parameters:​
  • body: Returns the specific contents of the target object to which the symlink points.​
  • Content-Length, ETag, x-tos-storage-class and x-tos-hash-crc64ecma: Return information about the target object to which the symlink points.​
  • Last-Modified: Returns the later of the last modification dates of the symlink and the target object.​
  • Other parameters: Return information about the symlink.​
When you use HeadObject to obtain object metadata, the content returned varies depending on the parameters:​
  • ETag, x-tos-storage-class, x-tos-hash-crc64ecma and x-tos-symlink-target-size: Return information about the target object to which the symlink points.​
  • Last-Modified: Returns the later of the last modification dates of the symlink and the target object.​
  • Other parameters: Return information about the symlink.​
Operations other than GetObject and HeadObject​
Only symlink information will be returned. Target object information will not be returned.​
​
Billing notes​
The billing method for symlinks is the same as for regular objects. The cost is calculated based on the symlink, rather than the object to which it points. For example, when using GetObject or HeadObject to retrieve symlink information, or when using the data processing feature on a symlink, you will be charged for the request and the data transfer based on the symlink. You will also incur request fees based on the storage type of the symlink when using PutSymlink or GetSymlink.​
Notes​
​
Category​
Considerations​
Region​
The symlink and the object it points to must reside in either the same region and bucket or the same region but different buckets. You cannot place a symlink and its target in different regions.​
Permissions​
TOS does not check if the creator has permission to access the target object when creating a symlink. However, when you try to access the target object via the symlink, TOS checks if your account has read permissions for both the symlink and the target object. Make sure your account has the necessary permissions. Otherwise, access will fail.​
Quantity​
The number of symlinks that can be created for a single object is unlimited.​
Storage type​
A minimum charge applies to objects stored in types such as Infrequent Access Storage and Flashback Archive, based on the size of the object. Objects smaller than 64 KiB are charged as if they were 64 KiB. For Standard Storage, if the number of objects smaller than 64 KiB in a given region is under 1 billion, the storage cost for that region is calculated based on the actual size of those objects. A symlink is usually less than 64 KiB. To avoid unnecessary charges, set the storage type of symlinks to Standard Storage.​
Operations​
Operations performed on a symlink, such as changing its storage type or deleting it, only affect the symlink itself and do not apply to the target object.​
​
Usage limits​
​
Category​
Description​
Creation restrictions​
  • Creating symlinks for directories is not supported.​
  • Creating secondary links is not supported. In other words, you cannot create symlinks that point to other symlinks.​
Access restrictions​
  • Restore the target object before accessing it via a symlink if the object is stored in Flashback Archive, Cold Archive, or Deep Cold Archive. Otherwise, access will fail. For instructions, see Restoring objects.​
  • You will no longer be able to access the symlink to the target object if the object is moved, deleted, or renamed.​
Feature restrictions​
The following features are not supported for symlinks:​
  • Cross-region and same-region replication: You cannot use these features to replicate symlinks.​
  • Server-side encryption: You cannot encrypt symlinks.​
  • Restore: You can download a symlink directly using GetObject, even if its storage type is Archive, Cold Archive, or Deep Cold Archive. There is no need to restore it first.​
TOS Browser restrictions​
Use TOS Browser 1.8.1 or later to download symlinks.​
​
Creating symlinks​
  1. Log in to the TOS console.​
  1. In the left navigation pane, click Buckets. In the Buckets list, click the bucket you want to manage.​
  1. On the Objects page, click ... > Set Symlink in the Actions column of the object you want to manage.​
  1. In the Set Symlink dialog, configure the following parameters.​
  • ​
    Parameter​
    Description​
    Symlink Bucket​
    Select a bucket in which to store the symlink. You can only select a bucket located in the same region as the target object.​
    Symlink Path​
    Select a positioning type and set the storage path for the symlink within the bucket:​
    • Relative path: The path is relative to the target object. For example, if the target object is in the /test/ directory and the path is set to data-symlink, the symlink will be located at /test/data-symlink.​
    tip​
    If the target object and the symlink are in different buckets and the target's path structure does not exist in the symlink's bucket, the relative path will be resolved from the root directory of the symlink's bucket instead.​
    • Absolute path: The full path starting from the root directory. For example, if the target object is in the /test/ directory and the path is set to data1-symlink, the symlink will be located at /data1-symlink.​
    After selecting the positioning type, enter the path according to the following requirements:​
    • Paths can contain Chinese characters, letters, numbers, and common symbols.​
    • You can use forward slashes (/) to quickly create subfolders.​
    • Paths cannot start with a forward slash (/) or backslash (\).​
    • Paths cannot contain consecutive forward slashes (/).​
    • Consecutive dots (..) cannot be used as a directory name.​
    Example: aaa/bbb/filename​
    ​
  1. Once you have finished configuring, click OK.​
  • After creating the symlink, hover over the link icon to the right of its name to view the path of the target object.​
Related documentation​
​
Last updated: 2025.11.10 15:51:40