# 上传版本文件

文件管理服务提供通过文件项管理多版本的功能。在上一节中您已学会如何对文件项进行重命名、移动、复制等操作,本节将介绍如何在指定文件项中上传版本文件。

# 1. 上传版本文件

若您希望在“BIMFACE示例文件"中上传新版本,那么您可以记录下文件项ID(fileItemId),通过上传版本文件 (opens new window)接口上传新版本。

# HTTP请求示例

# 请求 path
POST https://api.bimface.com/bdfs/data/v1/projects/10000022120160/files?fileItemId=10000022260842&length=6459392&name=示例文件.rvt
# 请求 header
"Authorization: Bearer cn-e9725999-0b36-4c0e-bdca-38ea88888888"

# HTTP响应示例

# 响应 200
{
  "code": "success",
  "message": null,
  "data" : {
    "appKey" : "odatvZYUSAWMbdUjTU8HoZXB9tFt6123",
    "createTime": "2023-03-15 15:16:18",
    "id": "10000022340099",
    "fileId": "10000022340099",
    "fileItemId": "10000022260842",
    "name": "示例文件.rvt",
    "fileItemName": "BIMFACE示例文件.rvt",
    "suffix": "rvt",
    "length": 6459392,
    "projectId": "10000022120160",
    "parentId": "10000022200497",
    "folder": false,
    "storeId": "10000022340097",
    "version": 5,
    "status": "SUCCESS",
    "uploadMode": "GENERAL",
    "md5": "af02c0906f369ae2029ef04afdb1913f",
    "physicalIndex": "d03821c0d4eb4416ae01e2a03723a32b",    
    "updateTime": "2023-03-15 15:16:18",
    "current": true,
    "originalCreateTime": "2023-03-08 11:08:50"
  }
}