Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
PUT /api/v1/file/{LibraryId}/{SpaceId}/{FilePath}?conflict_resolution_strategy={ConflictResolutionStrategy}&access_token={AccessToken}&user_id={UserId}
Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the media hosting console. See Create Media Library | String | Yes |
SpaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as a hyphen (`-`); if the media library is in multi-tenant mode, you must specify this parameter. See Create Tenant Space | String | No |
FilePath | Complete file path, such as foo/bar2/file.docx | String | No |
ConflictResolutionStrategy | Handling method when filename conflict, default is rename ask: returns HTTP 409 Conflict and the SameNameDirectoryOrFileExists error code when conflicts with rename: automatically rename file when conflicts with overwrite: If the target is a directory or album, it defaults to ask and does not support overwrite If the target is a file, overwrite the existing file When a file exists in the target space with an earlier version, moving to overwrite is not supported. | String | No |
AccessToken | Access token, see Generate Access Token | String | Yes |
UserId | User identity recognition. When the access token has admin permission and the user identity recognition during token application is empty, it is used to temporarily specify user identity. For details, see Generate Access Token API. | String | No |
{"linkTo": "foo/bar/file.docx"}
Request parameters. | Description | Type | Required or Not |
linkTo | The absolute path of the source file pointed to by the symbolic link. For retrieval, see View File Details. | String | Yes |
{ "path": [ "foo", "bar2", "file (1).docx" ] }
Response Parameters | Description | Type |
path | String array or null If it is an array of strings, it indicates the final symbolic link path. The last element in the array represents the final file name, and the other elements represent each first-level directory name. Because existing files with the same name may be renamed automatically, the final path here may not equal the designated target path during move or rename operations. If it is null, it means that a parent directory of the target path has been deleted, and the target symbolic link can no longer be accessed. | Array |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback