Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to upload (POST) files using tFileFetch component with multipart/form-data. I am not sure what I am doing wrong, it doesn't work for me.
Here are my screenshots:
Here is my request from Postman:
Could somebody help me with this?
Thanks.
I had faced a similar situation. Though there is a POST method in the component, seems it doesn't behave as expected.
I would suggest to create routine using Apache HTTP package/rest API to upload file while you resolve this issue.
Hello,
Could you please use tHttpRequest component with POST to send a file to a server to see if it works?
Best regards
Sabrina
Thanks for your response.
This is what I have in my tHttpRequest:
How can I pass the parameters (the ones I listed above in my Postman screenshot)?
Thanks.
I think, my question is, what should be the format of the "Post parameters from file". A sample file would really be helpful.
I am trying to upload files.
Thanks.
@needtalend wrote:
I think, my question is, what should be the format of the "Post parameters from file". A sample file would really be helpful.
I am trying to upload files.
According to the component docs (tHttpRequest), that file is the body of the post request. The format is key=value pairs:
id=12345 name=Joe
Thanks for your response.
I mentioned the file path of the file that I am trying to upload (in my "Post parameters from file") like this:
auth="abc"&id="123"&file1=\"C:\Pictures\Sample Pictures\Desert.jpg\"
This doesn't work. Is this the right way to mention the file that I am trying to upload from tHttpRequest?
Hi,
You could go to "Advanced settings" tab and select the option "upload file"
Regards,
YG Abhi