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, obtain it 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 hyphen (`-`); if the media library is in multi-tenant mode, you must specify this parameter. Please refer to 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 SameNameDirectoryOrFileExists error code when conflicts with rename: Automatically rename files 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 with an earlier version exists in the target space, moving to overwrite is not supported. | String | No |
AccessToken | Access token, see Generate access token | String | Yes |
UserId | User identity recognition. When the permission corresponding to the access token is admin permission and the user identity recognition during the access token application is empty, it is used to temporarily designate user identity. For details, see Generate Access Token API. | String | No |
{"copyFrom": "foo/bar/file_old.docx"}
Request parameters | Description | Type | Required or Not |
copyFrom | the source file path to be copied, see View File Details | String | Yes |
{ "path": [ "foo", "bar", "file_new (1).docx" ] }
Request parameters | Description | Type |
path | String array or null If it is an array of strings, it indicates the final file path. The last element in the array represents the final file name, and the other elements represent each first-level directory name. Since existing files with the same name may be renamed automatically, the final path here may not equal the specified target path during replication. If it is null, it means that a parent directory of the target path has been deleted, and the target file can no longer be accessed. | String |
피드백