Upload Beneficial Owner Document - Invalid file type

(Yogita Mankani) #1


While uploading the beneficial owner verification document using the C# SDK on sandbox env, I am always receiving the below validation error in response.
{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,"_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Invalid file type.”,“path”:"/file","_links":{}}]}}

I have tried uploading png, pdf, jpeg file types, but all of them fail.

Can you please guide what am I doing wrong here? Please find below the C# code using the DwollaClient from SDK :-

 using (Stream stream = new MemoryStream())
                            stream.Write(docContent, 0, docContent.Length);
                            Dwolla.Client.Models.File fileToUpload = new Dwolla.Client.Models.File() { Filename = "test.png", ContentType = "image/png", Stream = stream };

                            Task<HttpResponseMessage> uploadDocTask = broker.UploadDocument(benOwnerId, uploadFor, new UploadDocumentRequest() { Document = fileToUpload, DocumentType = "license" });


                       // Some more logic here

Thank you!

(Cory Anderson) #2

(Cory Anderson) #3

(Cory Anderson) #4

Rocky fixed this issue.