| @@ -99,8 +99,8 @@ | |||||
| "packageID": 1, // PackageID,使用从创建Package接口返回的ID | "packageID": 1, // PackageID,使用从创建Package接口返回的ID | ||||
| "affinity": 1 // 文件优先上传到哪个存储空间,可以不填。 | "affinity": 1 // 文件优先上传到哪个存储空间,可以不填。 | ||||
| }</pre> | }</pre> | ||||
| <p>之后的每一个part都是一个文件,name为files,filename为文件路径,需要进行URL编码。</p> | |||||
| <p>一个例子:</p> | |||||
| <p>之后的每一个part都是一个文件,name为files,filename为文件路径,需要进行URL编码。 | |||||
| 一个例子:</p> | |||||
| <pre>POST /object/upload HTTP/1.1 | <pre>POST /object/upload HTTP/1.1 | ||||
| User-Agent: PostmanRuntime/7.29.0 | User-Agent: PostmanRuntime/7.29.0 | ||||
| Accept: */* | Accept: */* | ||||
| @@ -108,27 +108,26 @@ Postman-Token: c12fa8b5-d902-46f3-b104-028effa0d531 | |||||
| Host: localhost:7890 | Host: localhost:7890 | ||||
| Accept-Encoding: gzip, deflate, br | Accept-Encoding: gzip, deflate, br | ||||
| Connection: keep-alive | Connection: keep-alive | ||||
| Content-Type: multipart/form-data; boundary=--------------------------818270992847011232305151 | |||||
| Content-Type: multipart/form-data; boundary=-----------------------------818270992847011232305151 | |||||
| Content-Length: 1649 | Content-Length: 1649 | ||||
| ----------------------------818270992847011232305151 | |||||
| <span></span> | |||||
| -----------------------------818270992847011232305151 | |||||
| Content-Disposition: form-data; name="info" | Content-Disposition: form-data; name="info" | ||||
| <span></span> | |||||
| { | { | ||||
| "userID": 1, | "userID": 1, | ||||
| "packageID": 1 | "packageID": 1 | ||||
| } | } | ||||
| ----------------------------818270992847011232305151 | |||||
| -----------------------------818270992847011232305151 | |||||
| Content-Disposition: form-data; name="files"; filename="test.txt" | Content-Disposition: form-data; name="files"; filename="test.txt" | ||||
| Content-Type: text/plain | Content-Type: text/plain | ||||
| <span></span> | |||||
| testdata | testdata | ||||
| ----------------------------818270992847011232305151 | |||||
| -----------------------------818270992847011232305151 | |||||
| Content-Disposition: form-data; name="files"; filename="a%2Fb%2Ftest2.txt" | Content-Disposition: form-data; name="files"; filename="a%2Fb%2Ftest2.txt" | ||||
| Content-Type: text/plain | |||||
| <span></span> | |||||
| testdata2 | testdata2 | ||||
| ----------------------------818270992847011232305151--</pre> | |||||
| -----------------------------818270992847011232305151--</pre> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| @@ -186,9 +185,9 @@ testdata2 | |||||
| <tr> | <tr> | ||||
| <td>Query</td> | <td>Query</td> | ||||
| <td colspan="2"> | <td colspan="2"> | ||||
| <pre>● objectID:int64 | |||||
| ● offset:int64,偏移量 | |||||
| ● length:int64,读取长度。不存在则读取整个对象</pre> | |||||
| <p> - objectID:int64 | |||||
| - offset:int64,偏移量 | |||||
| - length:int64,读取长度。不存在则读取整个对象 </p> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| @@ -200,8 +199,8 @@ testdata2 | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td colspan="3"> | <td colspan="3"> | ||||
| 如果请求成功,那么Content-Type将会是application/octet-stream,响应体就是文件数据。 | |||||
| 如果失败,那么Content-Type将会是application/json,响应体格式如下: | |||||
| <p>如果请求成功,那么Content-Type将会是application/octet-stream,响应体就是文件数据。 | |||||
| 如果失败,那么Content-Type将会是application/json,响应体格式如下:</p> | |||||
| <pre>{ | <pre>{ | ||||
| "code": "OperationFailed", | "code": "OperationFailed", | ||||
| "message": "xxxxxxxx", | "message": "xxxxxxxx", | ||||
| @@ -273,20 +272,16 @@ testdata2 | |||||
| } | } | ||||
| .api-doc-table td { | .api-doc-table td { | ||||
| padding: 8px 12px; | |||||
| border-top: 1px solid #eaecef; | |||||
| background-color: #ffffff; | background-color: #ffffff; | ||||
| } | } | ||||
| .api-doc-table td:first-child { | |||||
| .api-doc-table tr:not(:last-child) td:first-child { | |||||
| font-weight: bold; | 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> | </style> | ||||