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

Hello Everyone!!

I am trying to post Image files(Not file paths) to an application which is running on another System
through Http request activity. I have connected to the remote Api through http GET method sucessfully

now I want to post Files, and stucked!!
How to get FIles from local system and Post it through Http Post method!!
any Help will be appreciated

Regards
Aditya

1 Like

Hi @aditya.prakash,

I have developed a below custom activity for your situation. I have done the test locally. But I am not feel comfortable. Can you provide some public http to test the upload. So I did not update the documentation in the package thread.Can you please test it and give me your feedback.

NameSpace:

image

Activity:

image

Properties :

image

Thank you
Balamurugan.S

1 Like

Hello Balamurugan,

vanakaam!!:grinning: thanks for making such useful custom activities, I will try this bro

Thanks & Regards
Aditya

1 Like

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: