mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
fix uploading binary data through ETAPI, closes #2667
This commit is contained in:
25
test-etapi/put-note-content-binary.http
Normal file
25
test-etapi/put-note-content-binary.http
Normal 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); %}
|
||||
|
||||
Reference in New Issue
Block a user