cancel
Showing results for 
Search instead for 
Did you mean: 

How to stream a binary PDF file to a file using Snaplogic

TimBurns
New Contributor III

I am trying to stream a binary PDF file to a file using Snaplogic.

The equivalent would be to the following command:

curl “http://www.pdf995.com/samples/pdf.pdf” --output …/out/pdf.pdf

Is this possible?

image

Note the output doesn’t seem to be amenable to Document to Binary or any of the snaps I’ve tried.

1 ACCEPTED SOLUTION

robin
Former Employee

You can stream files from HTTP via either REST GET Snap (with Binary as the “Response Entity Type” setting value) or the File Reader Snap.

image

Pipeline: 7185_rest-get-pdf_2020_04_02.slp (7.9 KB)

If you are calling an endpoint that sends a multipart response, you may also consider leveraging our Multipart Reader Snap

View solution in original post

6 REPLIES 6

robin
Former Employee

You can stream files from HTTP via either REST GET Snap (with Binary as the “Response Entity Type” setting value) or the File Reader Snap.

image

Pipeline: 7185_rest-get-pdf_2020_04_02.slp (7.9 KB)

If you are calling an endpoint that sends a multipart response, you may also consider leveraging our Multipart Reader Snap

TimBurns
New Contributor III

Thanks! That’s exactly what I needed. Good to know that I can tweak the output on the mapper to cast a binary document to a binary stream.

image