1 Reply Latest reply on Jun 7, 2016 8:27 AM by rashedtalukder

    Upload local file via REST API using node.js

    radhika

      Hi All,

       

      I am trying to create an document using REST API and node js. I am able to create a plain document.

      When there is an attachment to it then getting 403 error.

       

      JSON used to create document

      {

          "content":

            {

            "type": "text/html",

            "text": "check"

            },

          "subject": "subject",

          "type": "document",

          "attachments":[

        {

        "doUpload":true,

        "url":"<file_path>"

        }

        ]

      }

       

      file path refers to a .xlsx file in my local.

      I had referred to other discussions like Upload local file via REST API  and Uploading attachments via the REST API Content Service using multipart/form-data? 

       

      Thanks,

      Radhika R