Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to send file in a POST API through trestclient,
i have attached the file and parameter in the query parameter but i couldn't detect the file.
Any help please
(Talend Beijing Tech Co., Ltd.)
Thanks
Hello,
What's your input file? Please try using a tRest component instead of a tRestClient to POST w/ a body. You can past the raw JSON directly in the HTTP body section.
Please have a look at my screenshots for details.You should be passing the value that is sent from the tFileInputRaw
Where 'row1' is the row leading from tFileInputRaw and 'content' is what represents the content of the file. (Clicking the row itself, then the component button will let you see what the schema is defined as)
Let us know if it is OK with you.
Best regards
Sabrina
Hello Sabrina,
Thanks a lot for your help.
I created the same flow and i have some issues:
(upload file and other parameters through REST api)
( This is the API Swagger ) Thanks @xdshi
Zied kh
Hello,
You input is PDF file? I didn't try to upload PDF file via trestxxx component before. Here is tfilefetch component which has Upload file option to upload one or more files to the server in advanced settings.
Best regards
Sabrina
Hello,
I have tried tFilefetch to send the file and params to the API ( see screenshots )
but I still have issues:
=> The problem is how to pass a PDF file and others parameters to the API .
Note:
it works well on Postman with this config :
Thanks xdshi]