# Posting PDF-files multipart/form-data solution

**URL:** https://discourse.nodered.org/t/posting-pdf-files-multipart-form-data-solution/58914
**Category:** General
**Tags:** http-request
**Created:** [24 February 2022 09:35 UTC](https://discourse.nodered.org/t/posting-pdf-files-multipart-form-data-solution/58914 "2022-02-24T09:35:25Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)
#### Post date: [25 February 2022 03:47 UTC](https://discourse.nodered.org/t/posting-pdf-files-multipart-form-data-solution/58914/2 "2022-02-25T03:47:40Z")

</div>

Hi Vincent -- thanks for taking the time to post your solution! I, too, have spent a good bit of time trying to piece together a multipart/form-data compliant payload that my Spring apis would accept. I'm not sure why there is no editor panel for the core `http-request` node, that would allow the user to include an array of files, buffers, and key/value pairs... or why I never offered to contribute that feature... hmmm.

Lately I've been referring to [this answer](https://discourse.nodered.org/t/form-data-multipart-encoded-request-with-pdf-file-attached-into-the-body/44749/2) from Nick for a bit simpler JS function example. It does require that your binary data be in a Buffer, but it avoids the user generated boundaries and interspersed CR/NL bits that are hard to find when they are not perfectly placed.

Welcome to the node-red community!

---

_[View the full topic](https://discourse.nodered.org/t/posting-pdf-files-multipart-form-data-solution/58914)._
