cancel
Showing results for 
Search instead for 
Did you mean: 

REST POST A File?

christwr
Contributor III

Seems like a silly question, but I have a pipeline with a REST POST snap like below which posts a file pulled directly from the SLDB filesystem and posts it to a URL, specifying an Upload File and Upload File Key. This seems to work fine…

works

But my file won’t really be coming from the SLDB filesystem, so I want to pretend my file is coming in via prior snaps in the pipeline and reference that in the REST POST using the HTTP Entity. So instead I’m loading the file separately and then running it through a BASE64ENCODE, mapping that to the same Upload File Key and then trying to REST POST that, but doesn’t work.

doesntwork

Any ideas?

14 REPLIES 14

andrew_holbrook
New Contributor III

Hi Chris,

I’ll let the SnapLogic folks reply officially, but a while back I made a REST Post “Binary Form Input” custom snap that’d probably fit your use case. Happy to share and problem solve with you to get it to work for you.

Regards,
Andrew

Hi Andrew,

Yes please. If you have an example, I would love to check it out.

Thanks!
Chris

Hey Chris,

Want to email me at andrew_holbrook@mckinsey.com? I can’t attached the snap pack as is to this platform.

Thanks!
Andrew

Hi Andrew,

Do you know how to send multiple files to rest post snap? The file numbers are dynamic so I cannot add them in rest post snap, we can expect a minimum of 1 file to maximum of 10 files. All the files needs to be sent in 1 rest call and file content types also vary(CSV,excel,jpeg…)