provide http file upload function

One Star

provide http file upload function

Hi All,
I would like to create a file upload function in Talend ESB to provide my end-users with the functionality to upload file via HTTP, and handle the file in a data integration job.
I have not seen any samples for this. Is this possible at all? Maybe via a tesbrequest?
It should work according to the multipart/form-data standard like used in for instance php file upload forms. Hope someone is able to help me out here.

Thanks,
Employee

Re: provide http file upload function

Hi,
1) With Talend ESB 5.4. (e.g. also with TOS4ESB) you can use the tRESTRequest component to upload binary data into a byte array which you then can use in other tXX components. But keep in mind that the file you upload is hold in memory on the REST provider, means you need to be sure about the max. size and the memory consumption on the provider. But for smaller files it might be ok. E.g. upload a profile image to a new user account in a single rest call with the meta data and the picture (as binary) of the person.
2) using a Route with cHttp and cFile to get the file content via standard HTTP and save it to a local file directly which you then might run a scheduled DI Job on or you directly call the tXXX components from the route to further process the file with cTalendJob.
Dietmar
One Star

Re: provide http file upload function

Thanks Dietmar. Going with the Route direction. Good to know that the trestrequest in 5.4 supports this, but i'm still on the 5.3 enterprise edition..
One Star

Re: provide http file upload function

Hi,
The route is working fine in my development environment. Next step is to deploy it to the runtime container within Talend enterprise. It is unclear how to do this, and with the cHttp component we cannot set the service locator or monitoring.
Any ideas on the best option to do this. As of now every deployment via the TAC failed. Service is not available..
Thanks,