Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jonlar
Contributor II
Contributor II

POST request with file sent as Multipart in route

Hi, I am having trouble getting the following use case to work and was wondering if anyone had a working example of this, or experience with this type of scenario.

Here is my use case:

We consume a HTTP POST request where a file is “attached” to the body through multipart. The file itself uses Google’s protobuf encoding.

We need to add two multipart fields named “accountId” & “accountNumber” with their respective values to the multipart body

We then send it to a service that accepts a POST request also using multipart but requires all three values present (file, accountId, accountNumber).

So basically, an east way to test it is to either use postman or the following cUrl:

CUrl -F file=@testfile.pb http://localhsot:8041/testservice/upload

I was wondering if anyone has a working example of a similar use case?

Currently I have tried many approaches but keep running into issues sending everything through the cRest component (producer)

Has anyone gotten something like this to work?

If at all possible we would like to stay with the Talend ESB components (camel)

 

Thanks for any and all help

Labels (4)
2 Replies
Anonymous
Not applicable

route that will process the multipart form, get the uploaded file from the 

requests.files[]array and return. We'll use this method to send the form to the django server using the requests library.

 LTD Commodities

 

jonlar
Contributor II
Contributor II
Author

HI @SFerry1649935247, would you happen to have a working example of this. I'd be quite interested in seeing it if you do.

 

Thanks alot!