PUT https://apigate.glodon.com/gcad/api/v1/file/upload
需要把dwg图纸压缩成zip格式作为1个文件上传
上传方式有两种:
| 类别 | 名称 | 说明 | 类型 |
|---|---|---|---|
| Header | Authorization 必填 | bearer {accessToken} | string |
| Query | name 必填 | 文件的全名,使用URL编码(UTF-8),最多256个字符 | string |
| Query | url 必填 | 文件所在url | string |
| 类别 | 名称 | 说明 | 类型 |
|---|---|---|---|
| Header | Authorization 必填 | bearer {accessToken} | string |
| Query | name 必填 | 文件的全名,使用URL编码(UTF-8),最多256个字符 | string |
| Body | 必填 | 文件数据 | binary |
| HTTP代码 | 说明 | 类型 |
|---|---|---|
| 200 | OK | GeneralResponse«FileBean» |
| 201 | Created | 无内容 |
| 401 | Unauthorized | 无内容 |
| 403 | Forbidden | 无内容 |
| 404 | Not Found | 无内容 |
请求 path
# 使用url上传:
http://apigate.hsifue.cn/gcad/api/v1/file/upload?name=example.dwg&url=http(s)://xxxxxxxxxxx
# 使用文件流上传:
http://apigate.hsifue.cn/gcad/api/v1/file/upload?name=example.dwg
请求 header
"Authorization: Bearer dc671840-bacc-4dc5-a134-97c1918d664b"
请求 body
(使用文件流方式上传时)上传文件流
请求成功数据说明
| 名称 | 说明 | 类型 |
|---|---|---|
| createTime 可选 | 样例 : "2017-11-09 13:25:03" |
string |
| etag 可选 | 样例 : "19349858cjs98ericu989" |
string |
| fileId 可选 | 样例 : 1216113551663296 |
integer (int64) |
| length 可选 | 样例 : 39044 |
integer (int64) |
| name 可选 | 样例 : "-1F.dwg" |
string |
| status 可选 | 样例 : "success","uploading","failure" |
string |
| suffix 可选 | 样例 : "rvt" |
string |
{
"code" : "success",
"data" : {
"createTime" : "2017-11-09 13:25:03",
"etag" : "19349858cjs98ericu989",
"fileId" : 1216113551663296,
"length" : 39044,
"name" : "-1F.dwg",
"status" : "success",
"suffix" : "rvt"
},
"message" : ""
}