Posting PDF-files multipart/form-data solution

The help sidebar for the HTTP Request node tells you how to do a file upload.

File Upload

To perform a file upload, msg.headers["content-type"] should be set to multipart/form-data and the msg.payload passed to the node must be an object with the following structure:

{
   "KEY": {
       "value": FILE_CONTENTS,
       "options": {
           "filename": "FILENAME"
       }
   }
}

The values of KEY , FILE_CONTENTS and FILENAME should be set to the appropriate values.

1 Like