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 parameter | 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 occurs, default is rename ask: Returns HTTP 409 Conflict and SameNameDirectoryOrFileExists error code when conflicts with rename: Automatically rename the file if 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 | String | Yes | |
UserId | User identity recognition. When the access token corresponds to admin permission and the user identity recognition during token application is empty, it is used to temporarily designate user identity. For details, see Generate Access Token API | String | No |
{"from": "foo/bar/file_old.docx"}
Request parameters | Description | Type | Required or Not |
from | the source file path to be renamed or moved. For retrieval, 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 target path specified during movement or renaming. 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 |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários