1
0
-1

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

    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      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
        CommentAdd your comment...
      1.  
        1
        0
        -1

        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

          CommentAdd your comment...
        1.  
          1
          0
          -1

          I have the same need. Experts ?

            CommentAdd your comment...