Добавить прямую загрузку по короткой подписи.
Proxy endpoint сохранён. Complete сверяет владельца, размер и checksum, а сравнение трафика API на двух размерах лежит в evidence.
This commit is contained in:
@@ -51,3 +51,18 @@ Authorization: Bearer {{sessionToken}}
|
||||
Content-Type: image/png
|
||||
|
||||
< ../tests/fixtures/sample.png
|
||||
|
||||
### Optional direct upload. PUT the bytes to the returned url, then complete with the real sha256.
|
||||
POST {{baseUrl}}/api/v1/chats/{{chatId}}/uploads
|
||||
Authorization: Bearer {{sessionToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{"filename":"sample.png","content_type":"image/png","size_bytes":1}
|
||||
|
||||
### Complete only after the PUT. Replace the id and checksum locally.
|
||||
POST {{baseUrl}}/api/v1/uploads/REPLACE_WITH_UPLOAD_ID/complete
|
||||
Authorization: Bearer {{sessionToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{"sha256":"replace-with-lowercase-sha256-of-the-bytes"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user