Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewdeveloper
Contributor
Contributor

How to upload a file using multipart/form-data

Hi everyone, I have followed this tutorial (https://community.talend.com/s/article/How-to-download-a-data-stream-from-an-HTTP-URL-as-a-binary-object-8ynqr) in order to download a file from a remote URL. Now I need to upload this file using multipart/form-data, I tried creating another tFileFetch and using the UPLOAD feature but it's not working, the FilePart constructor requires a File as the second parameter and I have an InputStream in my globalMap.

Thank you in advance.

Labels (4)
3 Replies
Anonymous
Not applicable

Hello,

Are you able to upload files via going to "Advanced settings" tab and select the option "upload file" in the tFileFetch component?

0695b00000LypSPAAZ.jpgBest regards

Sabrina

 

VenkyM
Contributor
Contributor

i do not know if the tfilefetch works for the requiremnet. to upload a file to web, i used trestclient component.

 

Anonymous
Not applicable

Hello,

What's error are you getting when creating another tFileFetch and using the UPLOAD feature?

Best regards

Sabrina