Добавить прямую загрузку по короткой подписи.

Proxy endpoint сохранён. Complete сверяет владельца, размер и checksum, а сравнение трафика API на двух размерах лежит в evidence.
This commit is contained in:
2026-11-09 00:36:52 +03:00
parent 8faf08d8eb
commit 4654de5837
18 changed files with 812 additions and 11 deletions
+15
View File
@@ -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"}