How to post Image Files(Not file paths) to another system using Http

Hi Guys,

I have used the attached process to get he CSV file from PDF file using pdftables.com site’s API.

this process will attach PDF file and send the HTTP request and returns the PDF data in CSV format.
In HTTP headers i have added the file path of the PDF.

Feel free to test and revert back if any clarifications.

PDF 2 CSV by http request (attch file headder).zip (92.8 KB)

Thanks,
Meg

Hi @megharajky

I have used same headers(multipart/form-data) and have given the full file name in the attachment while hitting my API, but i am getting the following error message:

{“timestamp”:1554982088895,“status”:500,“error”:“Internal Server Error”,“exception”:“org.springframework.web.multipart.MultipartException”,“message”:“Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found”,“path”:“/uploadfile”}

Any idea/solution on this.

For the same request i am getting 200 success from postman.

Regards,
Rajeswari

May be this is case when you requesting API from your system which having dependency n you r corporate AD, did you tried calling api from different system or does any VPN are connected?

Helllo,
I have developed the activity. Can any one suggest to test the activity ? some thing a free site…

Regards
Balamurugan.s

You can try pdftables.com it accepts pdf and results excel

Hello aditya.prakash,

Can you please elaborate how do you sending attachments through HttpPost? I want to upload Pdf file but is not working, can you please give me the steps of configuration for sending attachments. Thank you in advance.

Hello Megharajky,
How did you upload the PDF file to HTTP post method. Can you please give me the steps of configuration for HttpRequest ? it will be really appreciated.Thank you in advance

Hi,

Step 1:Add UiPath.Web.Activities package
Step 2: use HTTP Request activity, in that give the properties as below

Accept format: XML
Endpoint:
Method: POST
Attachments:
Body format: application/xml
Headers:
Name: Content-Type
value: “multipart/form-data”
result:
Status code:

  • I have used this activity in 2018 version, I can able to run in 2019.7 too , let me know if you face any issues. Also try to test using postman once before implementing in uipath
1 Like

Thank u Megharajky for your Reply, Everything working fine now.

1 Like

hey…its still not working…

I reviewed @megharajky files and changed a bit to Header property (remove Content-type). Now it works ok on my machine and studio (v2020.4.1).

Please test for yourself. Happy automation.

HTTP Request API to PDF to Excel.zip (167.7 KB)

1 Like