cancel
Showing results for 
Search instead for 
Did you mean: 

Http Utility- Request Multipart

MáriaBojová
Level 3
Hello,

recently I started using new version of HTTP Utility. I would like to upload file via HTTP Request Multipart, but for some reason the files are corrupted while arriving target destination. Any ideas why? From Postman it works fine. Am I configuring something incorrectly here?
16579.png

------------------------------
Mária Bojová
PTP Process manager digitalization
Deutsche Telekom
Europe/Bratislava
------------------------------
6 REPLIES 6

ewilson
Staff
Staff
Hi @Mária Bojová,

If you're submitting a text file you probably don't want to set the content type to x-binary. Instead, I'd go with text/plain.

Cheers,
​​

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric,

It does not work. The file is still corrupted. My issue is that I can not figure out correct configuration how to fill out the inputs to be able pass the file to Sharepoint. All other functions work fine.

The file on Sharepoint looks like this

16560.png

Kind Regards
Maria

------------------------------
Mária Bojová
PTP Process manager digitalization
Deutsche Telekom
Europe/Bratislava
------------------------------

Hi Maria,

That's what you get when you open the uploaded file?,  Seems to me that some how you are uploading the  Body Content of the request instead of the file, maybe you are mixing the inputs.

Which VBO and method are you using?,  can you show the configuration and inputs you used?

Regards,
Conrado Meli


------------------------------
Conrado Meli
Managing Partner
Primus IA
America/Santiago
------------------------------

AndreyKudinov
Level 10
If you are submitting multipart post request, your content type on the request level has to be: multipart/form-data; boundary=someuniqueboundary
It is described in https://datatracker.ietf.org/doc/html/rfc7578
You can even have multipart data within multipart data - google examples.

Nevermind, I was assuming you are trying to build multipart request yourself.

------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------

Hi Mária,

The file was not correctly read in the HTTP RequestStream which seems to have caused this issue. Can you please try the attached updated VBO and let us know if it works. 
I have tested it with one of the other multipart services that I have access to. The ContentType should be text/plain if it's a text file. If you leave it blank, the VBO sets it as the MIME Type of the file which in this case is text/plain anyway.


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Attached

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------