Using binary content type in HTTP client

In postman I am able to use the binary content type to upload a file as seen here.

However, I cannot find an option to do so in this activity, how can i do this?

Hi,

The following post will help you.

Regards,

HI, I have seen this post but I do not fully understand how I can post a file with content type binary to an HTTP end point

for example if i need to post MyFile.zip to http://connect.testwebsite…

Can you try below:

How to upload pdf files in binary format using HTTP request and MTOM - Help / Studio - UiPath Community Forum

Also try using format as “application/binary” see if that works

Thank you but I am unsure as to how to structure this

@Yoichi I get these errors

Hi,

Can you check the following sample?

Sample20230601-1aL.zip (2.5 KB)

Regards,

I get this error when i copy the code into my file… and, where do I put the pathway of the file I want to upload to the url?

Thanks for your help :slight_smile:

Hi,

Can you try to set as arguments?

Regards,

would bytes be the pathway to the file ?

Can you try File.ReadAllBytes method?

Regards,

I am sorry I am really confused :frowning: I need to put a file pathway into this call for example, “P:\Easyorder\UK\RSTR9999.zip”

Hope the following helps you.

Regards,

1 Like

And doing this will allow me to upload the zip folder to the http link?

Hi,

What is zip folder?

Regards,

The file I am trying to upload is a compressed folder with .zip extension

Please extract it to normal folder in advance.

Regards,

I have to upload it as a .zip folder to the http

Is it zip file? if so, you can read it using ReadAllBytes method.

It is yes, but will the code be able to upload a .zip file ?