0

I have to process this POST in PHP.

In this case $_FILES will be empty.

I can use php://input but not sure how to use the boundary part.

Or is there any PHP feature on this I am missing ?

Can anyone shed some light on this, please ?

POST /path/to/add?<query_parameters> HTTP/1.1
Host: www.myhostname.com
Content-Type: multipart/mixed; boundary=--d74496d66958873e

----d74496d66958873e
Content-Disposition: attachment; filename="file.pdf"
Content-Type: application/pdf

<pdf_file_binary>---d74496d66958873e
Content-Disposition: attachment; filename="data.json"
Content-Type: application/json

{"number" : "65432345", "other_number" : "567890765"}
----d74496d66958873e--
pszaba
  • 1,034
  • 9
  • 16

0 Answers0