- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 06:30 AM
I guess Ideal way of doing this is to use Single File option in WEB API configuration and passing Binary file from process.
But unfortunately the WEB API definition does not support the Binary File, even when used Binary File option from POSTMAN , it throws server error.
There are two options available it seems
1 ) Form-data : When I use this option in POSTMAN, it works fine but not sure how to use this option in Blueprism as Blueprism supports only below option
none
Template
Single File
Multiple File
Custome Code
2) Custom Code: Can someone guide how to use this option and code example of Posting xlsx file using content type multipart/form-data
------------------------------
Kirtish Trivedi
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 08:40 AM
The latest Utility - HTTP on Digital Exchange has action for Multipart request. Have you already considered that for your solutioning?
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 08:40 AM
The latest Utility - HTTP on Digital Exchange has action for Multipart request. Have you already considered that for your solutioning?
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 02:28 PM
I have tried using Utility - HTTP and action HTTP Request Multipart but still facing Internal server error 500
I have passed below parameter
Address URL : [URL]
UserName:[UserName]
Password:[Password]
forcePreAuth: True
Header parameter Accepts Collection type Hence Passing below
Autharization : [Basic XXX]
FileData accepts collection type hence passing below
FileName: ""
FieldName:""
ContentType:""
FilePath : "C:\..\abc.xlsx"
After running I am getting 500 Internal server error
When I checked with API team they say they are not getting file details in the request
Also they are getting boundry as below :
multipart/form-data; boundary=boundaryboundary
Is there anything I am doing wrong ?
------------------------------
Kirtish Trivedi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 02:42 PM
If forcePreAuth is set to True then the Authorization Header will be set by the utility. So can you try again without passing any Header parameter.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 02:56 PM
I tried that, I deleted everything from HEADER Collection and made it Empty and ran . Got the same error. and Header collection remains empty after the run. Is there anything else which can be of concern ?
------------------------------
Kirtish Trivedi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 03:19 PM
One other thing that I can think of is the FieldName. Currently you have set it to blank in HTTP utility. Did you set any value for "Key" under form-data in POSTMAN for this?
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-21 03:55 PM
Under Form-data in Postman, I have used one Key and in value I have attached .xlsx file,
As mentioned by you I used the same key in FieldName as well but the same error exists : 500: internal server error
------------------------------
Kirtish Trivedi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-07-21 07:08 AM
Issue is Resolved now. Thank you for your guidance. Along with the FieldName ,I added other values as well and it worked.
When I checked "Code" in PostMan I noticed there were few more parameters were being sent with request for uploading excel hence I mapped them in FileData Collection of Multipart Action as below
FileName- abc.xlsx
FieldName-FileName variable
Content-Type-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File path-Full file path
------------------------------
Kirtish Trivedi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-07-21 05:28 AM
Hi @shashank.kumar280,
Thanks for your help with this .
I have used HTTP Utility and It was working fine until yesterday but now it is throwing below error
Could not execute code stage because exception thrown by code stage: Object reference not set to an instance of an object.
I have passed below/attached parameter
It takes around 2 min 10 seconds before it throws an error
Also when I remove Try and Catch block , it throws below error
Could not execute code stage because exception thrown by code stage: The operation has timed out
Could you please assist with the possible cause and if it due to timeout, can you please let me know how to increase timeout ?
Note : Working fine through POSTMAN
------------------------------
Kirtish Trivedi
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-07-21 10:28 AM
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
