46 lines
1.1 KiB
HTTP
46 lines
1.1 KiB
HTTP
@host=http://localhost:8088
|
|
|
|
@md5=959e5310105c96e653f10b74e5bdc36b
|
|
@idx=9
|
|
### upload chunk
|
|
POST {{host}}/v1/uploads/{{md5}}/chunks/{{idx}} HTTP/1.1
|
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
Content-Disposition: form-data; name="file"; filename="0"
|
|
Content-Type: application/octet-stream
|
|
|
|
< ./fixtures/files/{{idx}}
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW--
|
|
|
|
|
|
### complete upload
|
|
POST {{host}}/v1/uploads/{{md5}}/complete HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"md5": "{{md5}}",
|
|
"filename": "camera.mp4",
|
|
"mime": "video/mp4",
|
|
"chunks": 30
|
|
}
|
|
|
|
### get medias
|
|
GET {{host}}/v1/medias HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
### get oss token
|
|
GET {{host}}/v1/admin/uploads/token HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
### get medias
|
|
GET {{host}}/v1/admin/medias HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
### get posts
|
|
GET {{host}}/v1/admin/posts HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
### get posts with keyword
|
|
GET {{host}}/v1/admin/posts?page=1&limit=10&keyword=99123 HTTP/1.1
|
|
Content-Type: application/json |