HELP: Journal entry batch attachment as Multi Part Form?

I really need some help please.

It seems a .NET framework class HttpPostedFileBase is leaked out into the swagger docs. This class no longer even exists in .NETCore.

I am trying to figure out how to call this API with MultipartFormDataContent but always get a 400 response with no useful information :(

var multiPartContent = new MultipartFormDataContent();

multiPartContent.Add(new StringContent(JsonConvert.SerializeObject(createAttachment, _settings.Value)));

multiPartContent.Add(new ByteArrayContent(createAttachment.Content), "file", createAttachment.FileName);

request_.Content = multiPartContent;

Does anyone have any examples of using this endpoint?

Comments

Categories