Hi,
im my custom app, I am trying to submit the following request, but it seems to be impossible:
POST <BASE-URL>/documents
Content-Type: multipart/form-data; boundary=<BOUNDARY>
Transfer-Encoding: chunked
--<BOUNDARY>
Content-Disposition: form-data; name=metadata
Content-Type: application/json
{
"metadata": {
"document" : {
"filename" : <filename>,
"title" : <title>
}
}
}
--<BOUNDARY>
Content-Disposition: form-data; name=document; filename=<filename>
Content-Type: <mime-type>
<File contents>
--<BOUNDARY>--
The API documentation says:
Note that both body parts are required and that their order is fixed: The “metadata” body part comes first, and the “document” body part comes second. Upload requests missing a part, or that contain parts in the wrong order, will not succeed.
I tried this request:
{
"url": "/documents",
"method": "POST",
"type": "multipart/form-data",
"headers": {
"Content-Type": "multipart/form-data"
},
"qs": { },
"body": {
"metadata": {
"value": "{}",
"options": {
"type": "application/json"
}
},
"document": {
"value": "{{parameters.file}}",
"options": {
"filename": "{{parameters.filename}}"
}
}
},
"response": {
"output": "{{body}}"
}
}
but the server error message is: Bodypart metadata is not of type application/json
Is it possible to set the content type for the json part?
Best Regards
Jörg