fix uploading binary data through ETAPI, closes #2667

This commit is contained in:
zadam
2022-02-18 22:34:46 +01:00
parent d940590add
commit 9f33791922
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
POST {{triliumHost}}/etapi/create-note
Authorization: {{authToken}}
Content-Type: application/json
{
"parentNoteId": "root",
"title": "Hello",
"type": "image",
"mime": "image/png",
"content": ""
}
> {% client.global.set("createdNoteId", response.body.note.noteId); %}
###
PUT {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
Authorization: {{authToken}}
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
< ../images/icon-color.png
> {% client.assert(response.status === 204); %}