| @@ -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=-----------------------------818270992847011232305151 | |||
| Content-Length: 1649 | |||
| ----------------------------818270992847011232305151 | |||
| <span></span> | |||
| -----------------------------818270992847011232305151 | |||
| Content-Disposition: form-data; name="info" | |||
| <span></span> | |||
| { | |||
| "userID": 1, | |||
| "packageID": 1 | |||
| } | |||
| ----------------------------818270992847011232305151 | |||
| -----------------------------818270992847011232305151 | |||
| Content-Disposition: form-data; name="files"; filename="test.txt" | |||
| Content-Type: text/plain | |||
| <span></span> | |||
| testdata | |||
| ----------------------------818270992847011232305151 | |||
| -----------------------------818270992847011232305151 | |||
| Content-Disposition: form-data; name="files"; filename="a%2Fb%2Ftest2.txt" | |||
| Content-Type: text/plain | |||
| <span></span> | |||
| testdata2 | |||
| ----------------------------818270992847011232305151--</pre> | |||
| -----------------------------818270992847011232305151--</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> - objectID:int64 | |||
| - offset:int64,偏移量 | |||
| - 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> | |||