27-02-23 02:09 PM
Hi @ewilson and Team,
We are trying to upload the files using API via postman ( Body: Form Data ) successfully, but getting error via (Body: Raw)
Kindly guide us the steps to follow, uploading the files (pdf/eml/xlsx) using blueprism. Getting error as "bad request".
Appreciate your response.
Thanks,
27-02-23 02:52 PM
Are you trying to do this via the Blue Prism Web API service feature, the Utility - HTTP VBO, or some connector from the DX?
Cheers,
27-02-23 02:55 PM
We are using Utility- Http VBO.
Thanks,
27-02-23 03:20 PM
Have you downloaded the latest version of the Utility - HTTP VBO from the DX, or are you using the version that comes installed with Blue Prism? If you're using the latter, you'll want to get the one from the DX as it has an action called HTTP Request - Multipart which you can use to replicate what you see in Postman. Check the user guide for details.
Cheers,
27-02-23 10:17 PM
Hi @ewilson - have you ever seen an issue with the HTTP Request - Multipart where the file being uploaded is passed to the target system but looks either corrupted or like it didn't decode? Any settings/configurations you've found that avoid that issue? All settings the same as in Postman and when executing through Postman, not seeing the same issue/docs are loaded as expected.
28-02-23 01:56 PM
Hello @Rachel Abbott
When the HTTP VBO reads the file from disk and writes it to the request stream it does so as straight binary data. The only time I've seen an issue with this is if the boundaries aren't properly set as that's what the web server uses to delineate where the file starts and ends.
Can you post a screenshot of your configuration of the VBO action?
Cheers,
28-02-23 03:14 PM
Hello @Rachel Abbott,
You might have this corrupt file issue if content type was left blank or not properly set. Screenshot of your FileMetadata collection would be useful to debug further.
28-02-23 03:39 PM
Thanks, @ewilson and @shashank.kumar280 . We made some configuration adjustments and this looks to be resolved. @shashank.kumar280 one question for you - if the ContentType is blank, shouldn't the mime type of the attachment be automatically applied? That was my understanding per the VBO documentation, and we're currently keeping that value blank (no issues since we made the other config updates). Just wanted to double check.
28-02-23 04:15 PM
Hello @Rachel Abbott,
Yes mime type is set for the binary file in the code stage automatically. However if there is a specific value required as per the API spec then it must be set in the FileMetadata collection.
10-08-23 02:18 AM
Hi Rachel, i am facing the same type of issue, may i know what configuration adjustments you made to resolve the issue.