Issues when passing filename with form-data in workflow resource

I have a file generation workflow that encodes to CSV using the following:

let unencoded = Papa.unparse(yourQueryNode.data)
let encoded = btoa(unencoded)
return [{
  data: encoded,
  name: 'YourFileName.csv',
  contentType: 'csv'
}];

I think this should work OOTB since the Papa libraries are included in the workflows by default.

Is there more info about the encoding type required for your POST request? I am not sure you need to create/return a new FormData object.