Browse Source

Merge branch 'master' of https://gitlink.org.cn/JointCloud/JCS-pub

feature_gxh
Sydonian 4 months ago
parent
commit
98a8c5f92e
1 changed files with 21 additions and 26 deletions
  1. +21
    -26
      docs/JCS_pub_API.md

+ 21
- 26
docs/JCS_pub_API.md View File

@@ -99,8 +99,8 @@
"packageID": 1, // PackageID,使用从创建Package接口返回的ID
"affinity": 1 // 文件优先上传到哪个存储空间,可以不填。
}</pre>
<p>之后的每一个part都是一个文件,name为files,filename为文件路径,需要进行URL编码。</p>
<p>一个例子:</p>
<p>之后的每一个part都是一个文件,name为files,filename为文件路径,需要进行URL编码。
一个例子:</p>
<pre>POST /object/upload HTTP/1.1
User-Agent: PostmanRuntime/7.29.0
Accept: */*
@@ -108,27 +108,26 @@ Postman-Token: c12fa8b5-d902-46f3-b104-028effa0d531
Host: localhost:7890
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------818270992847011232305151
Content-Type: multipart/form-data; boundary=&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;818270992847011232305151
Content-Length: 1649
----------------------------818270992847011232305151
<span></span>
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;818270992847011232305151
Content-Disposition: form-data; name="info"
<span></span>
{
"userID": 1,
"packageID": 1
}
----------------------------818270992847011232305151
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;818270992847011232305151
Content-Disposition: form-data; name="files"; filename="test.txt"
Content-Type: text/plain
<span></span>
testdata
----------------------------818270992847011232305151
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;818270992847011232305151
Content-Disposition: form-data; name="files"; filename="a%2Fb%2Ftest2.txt"
Content-Type: text/plain

<span></span>
testdata2
----------------------------818270992847011232305151--</pre>
&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;818270992847011232305151&#45;&#45;</pre>
</td>
</tr>
<tr>
@@ -186,9 +185,9 @@ testdata2
<tr>
<td>Query</td>
<td colspan="2">
<pre>● objectID:int64
offset:int64,偏移量
length:int64,读取长度。不存在则读取整个对象</pre>
<p> &#45; objectID:int64
&#45; offset:int64,偏移量
&#45; length:int64,读取长度。不存在则读取整个对象 </p>
</td>
</tr>
<tr>
@@ -200,8 +199,8 @@ testdata2
</tr>
<tr>
<td colspan="3">
如果请求成功,那么Content-Type将会是application/octet-stream,响应体就是文件数据。
如果失败,那么Content-Type将会是application/json,响应体格式如下:
<p>如果请求成功,那么Content-Type将会是application/octet-stream,响应体就是文件数据。
如果失败,那么Content-Type将会是application/json,响应体格式如下:</p>
<pre>{
"code": "OperationFailed",
"message": "xxxxxxxx",
@@ -273,20 +272,16 @@ testdata2
}

.api-doc-table td {
padding: 8px 12px;
border-top: 1px solid #eaecef;
background-color: #ffffff;
}

.api-doc-table td:first-child {
.api-doc-table tr:not(:last-child) td:first-child {
font-weight: bold;
}

/* .api-doc-table pre {
margin: 0;
font-family: monospace;
font-size: 14px;
line-height: 1.5;
} */
.api-doc-table p {
margin: 0 0;
line-height: 1.1;
}
</style>


Loading…
Cancel
Save