Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
POST /api/v1/file/`{LibraryId}`/`{SpaceId}`/`{ConfirmKey}`?confirm&conflict_resolution_strategy=`{ConflictResolutionStrategy}`&access_token=`{AccessToken}`&user_id=`{UserId}&with_inode={WithInode}`
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 |
ConfirmKey | Confirm parameters, specified as the field value of confirmKey in the response body when uploading files. | String | Yes |
ConflictResolutionStrategy | Handling method when filename conflict, defaults to rename ask: returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when conflicts with rename: automatically rename file when conflicts with overwrite: returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when conflicts with accessing the root directory, otherwise overwrites existing file, defaults to ConflictResolutionStrategy specified at file upload start. | String | No |
AccessToken | 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 designate user identity. For details, see Generate Access Token API | String | No |
WithInode | 0 or 1, whether to return inode (file directory ID), default do not return | String | No |
{"crc64": "xxx","labels":["elephant","animal","Asian elephant"],"category":"video","localCreationTime": "2022-07-26T02:58:09Z","localModificationTime": "2022-07-26T02:58:09Z"}
Request parameters. | Description | Type | Required or Not |
crc64 | The CRC64-ECMA182 check value of the file. If not specified, do not validate. If verification fails, return HTTP 400 Bad Request with the BadCrc64 error code. | String | No |
labels | File Tag List | String Array | No |
category | Customized Category | String | No |
localCreationTime | File Local Creation Time | String | No |
localModificationTime | File local modification time | String | No |
{"path": [ "foo", "bar", "file (1).docx" ],"name": "file (1).docx","type": "file","inode": "b63393076d249110000631c316d9751a","creationTime": "2020-09-22T07:44:45.000Z","modificationTime": "2021-02-01T08:21:47.000Z","contentType": "image/jpg","size": "1048576","eTag": "xxx","crc64": "xxx","metaData": {"x-smh-meta-foo": "bar"},"virusAuditStatus": 0,"isOverwritten": false,"previewByDoc": true,"previewByCI": true,"previewAsIcon": false,"fileType": "word"}
Response 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. Because files with the same name may exist and be renamed automatically, the final path here may not equal the designated path when uploading starts. If it is null, it means that the directory where the file resides or a certain parent directory has been deleted, and the file can no longer be accessed. | String |
name | Final file name | String Array |
type | File type | String |
inode | File directory ID | String |
creationTime | The time when the file is uploaded for the first time | String |
modificationTime | Last overwrite time of the file | String |
contentType | media type | String |
size | File size. | String |
eTag | File eTag | String |
crc64 | File CRC64-ECMA182 check value | String |
metaData | metadata, if there is no metadata this field does not exist | String |
isOverwritten | Whether file overwrite occurred during file upload | Array |
previewByDoc | Whether WPS can preview the file | Boolean |
previewByCI | Whether Wanxiang can preview the file | Boolean |
previewAsIcon | Use preview image as icon | Boolean |
fileType | File type: Excel, PowerPoint | String |
virusAuditStatus | 0-6 Virus scan status: 0: not detected (Folder does not tag as suspicious and remains 0) 1: detecting 2: risk-free 3: risk file(s) 4: Unable to detect (such as file too large exceeding detection range, treated as risk-free on client side) (files over 1GB not detected) 5: Manually marked as risk-free 6: Detect task failed | String |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan