Using the JSON API to create a new form record with file column?

Confluence User - 22 Jun, 2018

When using the JSON API to create a new form record, how should files (e.g. an image) be encoded?

json;api;forms

3


24 Jun, 2018
confluenceUser
confluenceUser

I'm using JSON API#web/json/data/form/store/(*:appId)/(*:formId)/(*:primaryKeyValue) and trying from postman to show example that it works this way.

curl -X POST \
'http://localhost:8080/jw/web/json/data/form/store/crm/crm_account/0002?j_username=admin&j_password=admin' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F attachment=@BoardingPass.pdf \
-F 'accountName=from json call name' \
-F id=0002
13 Jul, 2018
confluenceUser
confluenceUser

I have the same need. Experts ?

13 Jul, 2021
confluenceUser
confluenceUser

I have the same need and tried with Bastiana 's example but not working. there is show error below

org.joget.commons.spring.web.CustomDelegatingFilterProxy - Request processing failed; nested exception is java.lang.NullPointerException

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print