I need to send an attachment to a customer via http post. I did trying searching this forum for keywords “post attachment”, but didn’t see result I was looking for. It is a very large zip file (.zip) and normally we would have handled this via FTP, but we cannot in this circumstance. We have to do it via http post. I have not sent an attachment via http post before and looking within google, it seems pretty complicated, but the majority of those solutions did not involve webMethods. Has anyone done this before?
Based on the size of the file (15-20MB), I’m thinking that i would pull up pub.client:http and do the following:
- method: POST
- loadAs: stream
- data/stream: earlier in service, do pub.file:getFile which would get the large zip file, load as stream, then map getFile’s output body/stream to this http data/stream parameter???
- headers: CONTENT-TYPE = application/oclet-stream
- headers: FILENAME = BIGtestfile.zip
Guys, can you tell me if the above looks to be the correct strategy? Am I missing anything? Nothing is ever this simple for me, so I’m thinking there’s something else. Something more to be added to the headers? Content type correct? Any additional advice on this URGENT matter would be greatly appreciated.
Thanks in advance.