# 普通文件流

PUT https://file.bimface.com/upload

# 说明

使用普通文件流上传,不支持表单方式;文件流需要在request body中传递。

该接口仅支持默认项目的默认文件夹,其他项目或文件夹请使用文件管理服务的接口。

# 参数

Authorization * Bearer {accessToken} string
Content-Type * 数据流类型,取值:application/octet-stream string
Content-Length * 数据流文件长度 integer (int64)
*为必填项
# Query
name * 文件的全名,使用URL编码(UTF-8),最多256个字符 string
sourceId 调用方的文件源ID,不能重复 string
*为必填项

# 响应

HTTP代码 说明 类型
200 OK GeneralResponse«FileBean»
201 Created -
401 Unauthorized -
403 Forbidden -
404 Not Found -
# 200响应参数
GeneralResponse«FileBean»
名称 说明 类型
code 返回码 string
data 返回数据 FileBean
createTime 文件创建时间 string
length 文件字节数 int64
name 文件名称 string
etag 文件etag string
suffix 文件后缀 string
fileId 文件ID int64
status 上传状态 string
message 提示消息 string

# 消耗

  • application/json

# 生成

  • */*
  • application/json

# HTTP请求示例

# 请求 path
https://file.bimface.com/upload?name=BIMFACE示例文件.rvt
# 请求 header
"Authorization: Bearer dc671840-bacc-4dc5-a134-97c1918d664b"
"Content-Type: actet-stream"
"Content-Length: 11672"
# 请求体
待上传的文件流

# HTTP响应示例

# 响应 200
{
  "code" : "success",
  "data" : {
    "createTime" : "2020-11-09 13:14:15",
    "etag" : "19349858cjs98ericu989",
    "fileId" : 1938888813662976,
    "length" : 39044,
    "name" : "BIMFACE示例文件.rvt",
    "status" : "success",
    "suffix" : "rvt"
  },
  "message" : null
}