yuuvis® RAD Q&A

0 votes
by (210 points)


I am looking of script example for multipart/form-data POST to service using BPM server side scripting object $.http.post().

For example, I need to post PDF file and three string parameters like (example from postman request):

POST /pdf-service HTTP/1.1
Host: localhost:6123
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Cache-Control: no-cache
Postman-Token: 8e9b3262-d886-4d1d-8e68-97341018388e

Content-Disposition: form-data; name="file"; filename="download.pdf"
Content-Type: application/pdf

Content-Disposition: form-data; name="json"

        "strdocumentname": "Document name",
        "iddocumentid": 111,
        "catdocumenttype": "contract",
        "catfunction": "Legal",
        "catstatus": "In repository",
        "datdateofissue": "2018-08-10",
        "idowneruser": "root",
        "strcomment": "Comment",
        "datdocumentduedate": "2018-08-10",
        "catisrcneeded": "No",
        "tabinvolvedparties": [
        "strdynamicbu": "Business Unit",
        "cataccess": "Group",
        "tabprotocol": [
                "datdate": "2018-08-10T00:00:00.000Z",
                "strauthor": "Author1",
                "strdecision": "Decision",
                "strcommenttab": "Coment"
                "datdate": "2018-08-10T00:00:00.000Z",
                "strauthor": "Author2",
                "strdecision": "Decision2",
                "strcommenttab": "Coment2"

Content-Disposition: form-data; name="template_name"

Content-Disposition: form-data; name="watermark_name"


Is it possible at all?

1 Answer

+1 vote
by (2.8k points)

Multipart request are currently not aided by the server side scripting http request support.

You may be able to craft a valid multipart request using the raw body method and the possibility to modify the http headers, as shown here:
But I would advise to wait until multipart requests are supported.

Related questions