Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Acrobat Javascript - How to use Net.HTTP to send PDF as multipart-form-data

Adobe Community Professional ,
Sep 02, 2021 Sep 02, 2021

Copy link to clipboard

Copied

Has anyone figured this out? I'm trying to use Net.HTTP to POST the PDF as multipart-form-data. I can get the PDF as a stream using...

 

 

Collab.documentToStream(this)

 

 

But that's just gives me the PDF as the body, it's not multipart-form-data. My server only accepts multipart-form-data for this particular call. I've tried converting the stream to a string and then adding the boundaries etc. but then Net.HTTP won't accept the string as a parameter even when I convert it back to a stream.

 

Anyone ever done this successfully?

TOPICS
JavaScript

Views

31

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation