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

Hi @aditya.prakash,

Romba Naandri :smile:. Thank you

Thank you
Balamurugan.S

1 Like

Hi @balupad14,

upload file is not working in my case, have you ever tried Http Request activity with Post method?

there is option of attachment, i’m trying that one, it is also not working in my case!

Regards
Aditya

Hi @aditya.prakash,

do you know any public http upload site to test…

Regards
Balamurugan.S

Hey Balamurugan,

I have no idea about public http upload, but we can test it by making one rest api in another system!

we can acess that system by ipadress:port(web server)/ if both systems are in same n/w

i’m doing the same, GET Method is working fine, but not POST with attachment!!
if someone have sample for both! it will be great help!!

Regards
Aditya

@PrankurJoshi, @vvaidya @aksh1yadav might have solution for this

Hi @aditya.prakash,

The latest release , I have removed the activity from gallery. I am not convinced with out proper test.
But you can get the nuget package here.

BalaReva.Externals.Activities.4.0.0.zip (736.4 KB)

Thank you
Balamurugan.S

1 Like

Hi @balupad14,

if once we will test we can add!! keep Rocking Dear :clap: :wink:

but this Question is still unanswered, someone must have used Http POST/PUT Request with Attachment, would you give idea to whom I should approach for Getting Example OF same!!

Regards
Aditya

Hi @aditya.prakash @balupad14

Have you found any solution for this question yet? Looking forward to your shares.

Thanks,
Ken

Hey Canh,

Not yet found solution!! I will post it once I will have solution

Regards
Aditya

HI , Can you send me the error what you have received while u used the custom activity.

Regards
Balamurugan.S

Hey Balamurugan,

i’m not getting error, I only want to send files by Uipath HTTP Post request and receive it on another API either on same machine or another machine,

As there is Attachment option in UIPATh Http Post Request, i’m Sending file by Attachment, i’m not getting any exception, but my question is how to get that file on another API, in which variable the file has Stored

Regards
Aditya

Hello @aditya.prakash

Me too facing the similar issue, need to upload the PDF file to HTTP post method,
did you got any solution?

@UiPathMaster any idea how to pass multipart form data to POST API call?

mine is like:

------WebKitFormBoundarytvYPYIB3ex12bhe7
Content-Disposition: form-data; name=“q”; filename=“12page.pdf”
Content-Type: application/pdf

Thanks,
Meg

Hi,

For posting Files as multipart/form-data, you can use HTTP Request and select Method POST (or PUT depending on your need) add your files in the Attachments area. In the Value field you should add the full file name.

Regards,
Manuela

Hey Manuela,

I have did the same as you have suggested, but my question is Attachment files will send through which variable?
it will be great help if you will provide a working sample!

Regards
Aditya

Hi Aditya,

In order to understand your use case, could you please use Postman or another similar tool for testing APIs and share the configuration of the request that you want to send? How does your API look like?

Regards,
Manuela

Hello,

I got the solution long back, sorry couldn’t remembered to intimate,
Is this still open?

Thanks,
Meg

Hi @megharajky

Feel free to post your solution as it might help others :slight_smile:

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?